Chapter Contents

Previous

Next
SAS Companion for the OpenVMS Operating Environment

Automatic Macro Variables

The following automatic macro variables have aspects that are specific to the OpenVMS operating environment:

SYSCC
specifies a character string that can be passed to SAS programs. By default, the value of SYSPARM is in uppercase in the OpenVMS operating environment. To preserve the case of the string, enclose it in double quotation marks.

SYSDEVIC
gives the name of the current graphics device.

SYSENV
is provided for compatibility with the SAS System running on other operating environments, but it is not relevant in the OpenVMS operating environment. In the OpenVMS environment, its value is always FORE.

SYSJOBID
lists the OpenVMS process ID (PID) of the process that is running the SAS System, (for example, 27A0D1D2).

SYSPARM
specifies a character string that can be passed to SAS programs. By default, the value of SYSPARM is in uppercase in the OpenVMS operating environment. To preserve the case of the string, enclose it in double quotation marks.

SYSRC
holds the OpenVMS status of DCL commands that were issued during your SAS session. The variable holds a character string that is the text form of the decimal value of the OpenVMS command status. For example, consider the following statements:
x 'dirf'; /* an invalid OpenVMS command */
%put This OpenVMS status is &sysrc;

x 'dir'; /* a valid OpenVMS command */
%put The corrected OpenVMS status is &sysrc;
When these statements are issued, the following lines are written to the SAS log:
This OpenVMS status is 229520
The corrected OpenVMS status is 0

SYSSCP
in the OpenVMS Alpha operating environment, SYSSCP returns the value VMS_AXP. In the OpenVMS VAX operating environment, SYSSCP returns the value VMS.

SYSSCPL
returns the value OpenVMS for both the OpenVMS Alpha and VAX operating environments.

SYSSESID
returns the client name of an application. The client name of a SAS session consists of either the value of the xresources="name" or the word SAS plus the SAS session ID. SAS is the default. The SAS session ID is incremented once for each concurrent session that is started. For example, if you start a second SAS session without ending the first session, then the default client name for the second session is SAS2.

VMSSASIN
contains the value of the SYSIN= system option and provides you with the name of the SAS job that is currently being run. When the SAS System is run in interactive mode, the value of VMSSASIN is SYS$INPUT.

The following is an example using this macro variable:

data test;
   infile '[school]roster.dat';
   input name $ age grade $;
run;

proc print data=test;
   title "Output generated by &vmssasin program.";
run;

Alternatively, you could put the value of the VMSSASIN macro variable into a variable in your data set:

data test;
   infile '[school]roster.dat';
   input name $ age grade $;
   job=symget("vmssasin");
run;


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.