Comparisons
SYSVER provides the release number of the SAS software that is running. You can use
SYSVER to check for the release of SAS before running a job with newer features.
Example: Identifying SAS Software Release
The following statement displays the release number of a user's SAS software.
%put I am using release: &sysver;
Submitting this statement (for a user of SAS 9.4) writes the following to the SAS log:
I am using release: 9.4
Submitting this statement (for a user of SAS Viya) writes the following to the SAS log:
I am using release: 3.02
SYSVLONG Automatic Macro Variable
Contains the release number and maintenance level of SAS software that is running.
Type: Automatic macro variable (read only)
See: “SYSVER Automatic Macro Variable” on page 232 and “SYSVLONG4 Automatic
Macro Variable” on page 233
Comparisons
SYSVLONG provides the release number and maintenance level of SAS software, in
addition to the release number.
Example: Identifying a SAS Maintenance Release
The following statement displays information identifying the SAS release being used.
%put I am using release: &sysvlong;
Submitting this statement (for a user of SAS 9.4) writes the following to the SAS log:
I am using release: 9.04.01M4D090816
Submitting this statement (for a user of SAS Viya) writes the following to the SAS log:
I am using release: V.03.01M0P082916
SYSVLONG4 Automatic Macro Variable
Contains the release number and maintenance level of SAS software that is running and has a four-digit
year.
SYSVLONG4 Automatic Macro Variable 233
Type: Automatic macro variable (read only)
See: “SYSVER Automatic Macro Variable” on page 232 and “SYSVLONG Automatic
Macro Variable” on page 233
Comparisons
SYSVLONG4 provides a four-digit year and the release number and maintenance level
of SAS software. SYSVLONG does not contain the four-digit year but everything else is
the same.
Example: Using SYSVLONG4 Automatic Macro Variable
The following statement displays information that identifies the SAS release being used.
%put I am using maintenance release: &sysvlong4;
Submitting this statement (for a user of SAS 9.4) writes this comment to the SAS log:
I am using maintenance release: 9.04.01M4D09082016
Submitting this statement (for a user of SAS Viya) writes this comment to the SAS log:
I am using maintenance release: V.03.01M0P08292016
SYSWARNINGTEXT Automatic Macro Variable
Contains the text of the last warning message formatted for display in the SAS log.
Type: Automatic macro variable (read only)
Details
The value of SYSWARNINGTEXT is the text of the last warning message generated in
the SAS log. For a list of SYSERR warnings and errors, see “SYSERR Automatic
Macro Variable” on page 208.
Note: If the last warning message text that was generated contains an & or % and you are
using the %PUT statement, you must use the %SUPERQ macro quoting function to
mask the special characters to prevent further resolution of the value. The following
example uses the %PUT statement and the %SUPERQ macro quoting function:
%put %superq(syswarningtext);
For more information, see “%SUPERQ Function” on page 277.
Example: Using SYSWARNINGTEXT
This example creates a warning message:
data NULL;
set doesnotexist;
run;
%put &syswarningtext;
234 Chapter 14 Automatic Macro Variables
When these statements execute, the following comments are written to the SAS log:
1 data NULL;
2 set doesnotexist;
ERROR: File WORK.DOESNOTEXIST.DATA does not exist.
3 run;
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.NULL might be incomplete. When this step
was stopped there were 0 observations and 0 variables.
NOTE: DATA statement used (Total process time):
real time 11.16 seconds
cpu time 0.07 seconds
4 %put &syswarningtext;
The data set WORK.NULL might be incomplete. When this step was
stopped there were 0 observations and 0 variables.
SYSWARNINGTEXT Automatic Macro Variable 235
236 Chapter 14 Automatic Macro Variables
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset