0

I'm capturing the automatic sysjobid macro variable in a table, and so it would help to know the range of possible types (Character/Numeric) and values (which are operating system dependent).

EDIT: whilst theoretically any value could be passed, what is most useful is to know what is the maximum in 99% of cases.

What is the largest value that any of you have witnessed in your deployments?

Allan Bowe
  • 12,306
  • 19
  • 75
  • 124

1 Answers1

1

Let's see:

  • Linux: 32768 for 32-bit systems, or 4194304 for 64-bit systems (source)
  • Windows: up to DWORD_MAX (source), which I think in this context is 4294967295 (source)

Can anyone fill in the blanks for some of the other operating systems supported by SAS? There are many...

user667489
  • 9,501
  • 2
  • 24
  • 35
  • ok you raise a valid point, the value COULD be a very large string (the maximum for which is 32,767 in SAS). I'll rephrase the question slightly so that it is more useful – Allan Bowe Jun 05 '17 at 09:00
  • The numbers quoted above are maximum values, not maximum lengths. The sas character variable length limit is not applicable here. – user667489 Jun 05 '17 at 09:03
  • aah ok - so you're saying that the value returned is always numeric? and an integer? – Allan Bowe Jun 05 '17 at 09:12
  • As a macro variable, `&SYSJOBID` is always text - it's up to you to input the value appropriately if you want to store it as a numeric variable in a data set. I am not aware of any operating systems that have process IDs other than non-negative base-10 integers, but it's conceivable that one exists. – user667489 Jun 05 '17 at 09:31
  • that's what I thought, hence the question - I'd like to store it appropriately :-) – Allan Bowe Jun 05 '17 at 09:45