BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
jbodart
Obsidian | Level 7

Automatic macro-variables seem to provide either a too simple or a too complex version number:

AUTOMATIC SYSVER 9.4
AUTOMATIC SYSVLONG 9.04.01M8P011823
AUTOMATIC SYSVLONG4 9.04.01M8P01182023


Can we assume that the maintenance version (such as TS1M8) can always be derived from &sysvlong, and if yes what would be a reliable way of doing it ?

1 ACCEPTED SOLUTION

Accepted Solutions
LinusH
Tourmaline | Level 20

For any 9.4 version, yes.

And if you migrate to Viya 4, this wil be the format:

V.04.00M0P083123
Data never sleeps

View solution in original post

4 REPLIES 4
jbodart
Obsidian | Level 7
yes that works with the current version but is that guaranteed to work with any version ?
LinusH
Tourmaline | Level 20

For any 9.4 version, yes.

And if you migrate to Viya 4, this wil be the format:

V.04.00M0P083123
Data never sleeps
jbodart
Obsidian | Level 7

I ended up with:

 

%if &sysver=9.4 %then %do;
   %let software_version = SAS &sysver (TS%sysfunc(prxchange(s/^0*//, 1, %qscan(%qscan(&sysvlong,3,.),1,P))));
%end; %else %do;
   %let software_version = SAS &sysvlong;
%end;
%put &=software_version;

which results in:
SOFTWARE_VERSION=SAS 9.4 (TS1M8)

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 753 views
  • 1 like
  • 3 in conversation