Getting Started with SAS under OpenVMS |
Introduction to OpenVMS Logical Names Used by SAS |
The definitions for OpenVMS logical names are provided in one of the following ways:
By SAS or your system administrator to specify aspects of SAS programs or SAS sessions for your site. These logical names are defined by the SAS92.COM file.
By you to customize aspects of your SAS session. For more information about the logical names that you can define, see Logical Names That You Can Define.
Logical Names That You Can Define |
You can use the following logical names to customize aspects of your SAS session.
contains the name of the current alternate SAS log file, if one is created. SAS$ALTLOG corresponds to the ALTLOG= system option. For more information, see ALTLOG= System Option: OpenVMS.
contains the name of the current alternate SAS output file, if one is created. SAS$ALTPRINT corresponds to the ALTPRINT= system option. For more information, see ALTPRINT= System Option: OpenVMS.
defines to SAS the location of a configuration file. For more information, see Configuration Files and Precedence for System Option Specifications.
defines to SAS the location of an autoexec file. The AUTOEXEC= system option takes its value from SAS$INIT, if SAS$INIT is defined. For more information, see AUTOEXEC= System Option: OpenVMS.
contains the name of the SAS log. SAS$LOG corresponds to the LOG= system option. For more information, see LOG= System Option: OpenVMS.
contains the name of the SAS procedure output file. SAS$PRINT corresponds to the PRINT= system option. For more information, see PRINT= System Option: OpenVMS.
specifies the names of translation tables that are used by various parts of SAS.
points to your Work subdirectory. For more information about the Work subdirectory, see The Work Library under OpenVMS.
contains the OpenVMS status code that indicates whether an X command or X statement executed properly. The logical name is stored in the JOB logical name table and can be checked after the execution of any X command or statement. If the X command or statement was successful, the value is 1. Any other value indicates that the X command or statement was not successful.
The following program uses the GETLOG function to determine whether the X statement executed properly. If the X statement did execute properly, then the program continues; if it did not, then the program stops.
x 'create/dir [sasxyz.newdir]'; data _null_; x=getlog('sas$x_status'); if x^="1" then do; put 'The directory was not created.'; put 'The OpenVMS return code was: ' x; put 'Program stopping.'; abort return; end; else put 'Directory was created successfully.'; run; libname mylib '[sasxyz.newdir]'; data mylib.test; input revenue expenses; profit=revenue-expenses; datalines; 39800.73 35678.93 28900.38 28456.99 40933.22 5683.33 ;
Note: The ABORT RETURN statement not only stops the program, but also ends your SAS session.
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.