Chapter Contents |
Previous |
Next |
SAS Companion for the CMS Environment |
options nodate linesize=75; libname mylib 'b';
In this example, the OPTIONS statement sets some SAS system options, and the LIBNAME statement assigns a libref.
Note: Some SAS system options can be specified only when you invoke SAS. These system
options cannot be specified in an OPTIONS statement; therefore, they cannot
be specified in an autoexec file. Summary Table of SAS System Options tells where each SAS system option
can be specified.
Another difference between configuration files and autoexec files is that configuration files are processed before SAS is initialized, whereas autoexec files are processed after SAS is initialized. Therefore, setting the NODATE and LINESIZE= options in a configuration file affects the appearance of the SAS log header, whereas setting NODATE and LINESIZE= in an autoexec file does not. An OPTIONS statement in an autoexec file is equivalent to submitting an OPTIONS statement as the first statement of your SAS session.
Creating an Autoexec File |
To create an autoexec file, follow these steps:
Specifying an Autoexec File |
sas (autoexec=myexec
The SAS filetype is assumed. If your autoexec file has a different filetype, then you must specify the filetype, and you must enclose the file specification in quotation marks. For example, the following SAS command specifies the autoexec file named AUTO1 AUTOFILE.
sas (autoexec='auto1 autofile'
If you don't include a filemode in your file specification, then SAS searches your minidisks or SFS directories in standard CMS search order to locate the autoexec file.
Note: Alternatively, you may include the filemode or
an explicit SFS directory as a value in the AUTOEXEC= option. If you specify
either, you must also specify a filetype.
Displaying Autoexec Statements in the SAS Log |
libname mylib 'b'; filename newdata 'myprog data c';
If you use the following command to invoke SAS, then the contents of MYEXEC FILE will be written to the SAS log.
sas (autoexec='myexec file' echoauto
For more information about the ECHOAUTO system option, see SAS Language Reference: Dictionary.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.