Architecting, installing and maintaining your SAS environment

Programatically determine whether the SAS session running is 32-bit or 64-bit.

Accepted Solution Solved
Reply
Contributor
Posts: 72
Accepted Solution

Programatically determine whether the SAS session running is 32-bit or 64-bit.

Hi,

 

I am looking for a way of programatically determining whether an instance of SAS 9.3TS1M2 is the 32-bit or the 64-bit version.

 

I know that

%PUT &SYSVLONG4

will return the SAS version (i.e. 9.03.01M1P11022011), and that
%PUT &SYSSCPL

will return the Operating System and its bitness (i.e. X64_7PRO)

 

However, I would like something that returns whether the SAS.EXE that is running is the 32-bit or the 64-bit version.

 

I cannot find a documentation reference to another automatic macro variable: SYSADDBITS so I am not sure if that is referring to the bitness of the OS or the bitness of the SAS.EXE that is running the SAS session.

 

Does anyone have any thoughts on this one? One thought I had was that the SAS session start-up messages may show this informaiton, but if it does, I'm not sure where it is lurking.

 

Thanks,

Downunder Dave.
It's another day in paradise down here today

 

 


Accepted Solutions
Solution
‎02-14-2017 04:43 AM
PROC Star
Posts: 1,322

Re: Programatically determine whether the SAS session running is 32-bit or 64-bit.

I think &SYSSCPL will do what you want.  I'm running 9.3 32-bit on 64-bit Win 7.

 

It returns:

 

18 %put &sysscpl;

W32_7PRO

19 %put &sysaddrbits;

32

 

I don't have 64 bit SAS on this box, but I'm pretty sure if I did, both macro vars would return something that was clearly 64 bit.  See for example this old SASL post on the subject: http://marc.info/?l=sas-l&m=135793131724639 

View solution in original post


All Replies
Solution
‎02-14-2017 04:43 AM
PROC Star
Posts: 1,322

Re: Programatically determine whether the SAS session running is 32-bit or 64-bit.

I think &SYSSCPL will do what you want.  I'm running 9.3 32-bit on 64-bit Win 7.

 

It returns:

 

18 %put &sysscpl;

W32_7PRO

19 %put &sysaddrbits;

32

 

I don't have 64 bit SAS on this box, but I'm pretty sure if I did, both macro vars would return something that was clearly 64 bit.  See for example this old SASL post on the subject: http://marc.info/?l=sas-l&m=135793131724639 

Contributor
Posts: 72

Re: Programatically determine whether the SAS session running is 32-bit or 64-bit.

Quentin,
Thanks for your quick response.

It looks like SYSADDRBITS shows the bitness of the SAS session and that's just what I am looking for.

Cheers,

Downunder Dave
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 210 views
  • 0 likes
  • 2 in conversation