|SAS Companion for the OS/2 Environment
The following automatic macro
variables have values that
are specific to OS/2:
- contains the current SAS condition code
that SAS will return to OS/2 when the SAS System exits. Upon exit, SAS translates
this condition code to a return code that has a meaningful value for the operating
- gives the name of the current graphics device.
The current graphics device is determined by the DEVICE system option. Contact
your SAS Support Representative to determine which graphics devices are available
at your site. For information about the DEVICE system option, see DEVICE and SAS Language Reference:
- always contains the value
FORE under OS/2.
- returns a number (the process ID) that uniquely
identifies the SAS task under OS/2.
- returns the maximum long integer value allowed
under OS/2, which is 2,147,483,647.
- holds the OS/2 status of OS/2 commands executed
during your SAS session. The variable holds a character string that is the
text form of the decimal value of the OS/2 command status.
For example, consider the following statements:
x 'dirf'; /* Invalid OS/2 command */
%put This OS/2 status is &sysrc;
x 'dir'; /* Valid OS/2 command */
%put The corrected OS/2 status is &sysrc;
The following lines are
written to the SAS log:
This OS/2 status is 1
The corrected OS/2 status is 0
The OPTIONS statement turns the XWAIT option off so
that the OS/2 command prompt window disappears automatically without your
having to type EXIT to return to your SAS session. If you run this example
with the XWAIT option on, it does not work because you get a value of 0 in
both cases; 0 is the return code for the EXIT command. If NOXSYNC is on, the
value of SYSRC is automatically 0.
- returns the operating system abbreviation
- returns the name of the specific environment
you are using. For Version 8 of the SAS System under OS/2, the
return value is OS2.
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.