Chapter Contents |
Previous |
Next |
SAS Companion for the OS/390 Environment |
You can customize your SAS session in five ways:
sas options('nocenter linesize=80')
//MYJOB EXEC SAS, // OPTIONS='NOCENTER, LINESIZE=80'
sas config('''my.config.file''')This next example specifies a user configuration file using JCL:
//MYJOB EXEC SAS, // CONFIG='MY.CONFIG.FILE'
See Precedence for Option Specifications for information about the order of precedence for options specified using these methods.
Configuration Files |
To create a user configuration file, use any text editor to write SAS system options into a physical file. The configuration file can be either a sequential data set or a member of a partitioned data set that contains 80-byte fixed-length records. When you allocate a system or user configuration file, you must specify LRECL=80 and RECFM=FB.
Whichever type of data set you choose, specify one or more system options on each line. If you specify more than one system option on a line, use either a blank or a comma to separate the options.
Some options can be thought of as on (enabled) or off (disabled). Specifying just the keyword enables the option; specifying the keyword prefixed with NO disables the option. For example, the configuration file might contain these option specifications:
NOCENTER NOSTIMER NOSTATS
All of these options are disabled.
Options that take a value must be specified in the following way:
option-name=value
For example, a configuration file might contain the following lines:
LINESIZE=80 PAGESIZE=60
Note: When you specify SAS system
options in a configuration file, blank spaces are not permitted before or
after an equal sign. Comment lines must start with an asterisk in column 1.
A configuration file can contain any system option except
the CONFIG= option. If CONFIG= appears in a configuration file, it is ignored;
no error or warning message appears.
To tell SAS where to find your user configuration file, do the following:
sas config('''my.config.file''')
//S1 EXEC SAS,CONFIG='MY.CONFIG.FILE'
The user configuration file that you specify is executed along with the system configuration file that your installation uses. This happens because the SAS CLIST or the SAS cataloged procedure concatenates the file that you specified to the system configuration file.
Note: The SAS system options that you specify in the user configuration
file override system options that are specified in the system configuration
file.
Autoexec Files |
options fullstats pagesize=60 linesize=80; libname mylib 'userid.my.lib'; dm 'clock';
The OPTIONS statement sets some SAS system options, the LIBNAME statement assigns a library, and the DM statement executes a command.
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. See Summary of All SAS System Options Available under OS/390 for information about
SAS system options and about where they can be specified.
sas autoexec('''my.exec.file''')
//MYJOB EXEC SAS //SASEXEC DD DSN=MY.EXEC.FILE,DISP=SHR
SASUSER Library |
When you use the SAS CLIST that is supplied by SAS Institute to invoke SAS under TSO, the CLIST allocates a physical file to be used as the SASUSER library during your SAS session. The SASUSER library is normally used only in interactive processing; the SAS cataloged procedure, which invokes SAS in batch processing, does not allocate a SASUSER library.
In addition to storing function key settings and window attributes, the SASUSER.PROFILE catalog is used to store your DEFAULT.FORM. The DEFAULT.FORM is created by the FORM subsystem. It is used to control the default destination of all output that is generated by the PRINT command. (See Using the PRINT Command and the FORM Subsystem and SAS Language Reference: Dictionary for information about the FORM subsystem.)
Note: If your SAS CLIST has been modified so that it does not create a SASUSER library,
SAS creates a PROFILE catalog that is used to store profile information for
use during a single SAS session. This catalog is placed in the WORK library
and is deleted at the end of your session; it is not available to a subsequent
SAS session.
By creating your own SASUSER libraries, you can customize the SAS System to meet the requirements of a number of different types of jobs. For example, suppose you want to create a user profile for a particular type of task that requires a unique set of key definitions.
In order to do this, you must first create a SAS data library that can be used as the SASUSER library. The easiest way to accomplish this is to start a Version 8 SAS session and then use a LIBNAME statement to create the library, as explained in Allocating SAS Data Libraries Internally. For example, to create a SAS data library with a physical file name of ABC.MY.SASUSER, submit the following LIBNAME statement:
libname newlib 'abc.my.sasuser' disp=new;
Notice that a libref of NEWLIB was used in this example. SASUSER is a reserved libref and cannot be reassigned during a SAS session.
You can also use the TSO ALLOCATE command to create an physical file for use as your SASUSER library. By using the ALLOCATE command, you can avoid using the LIBNAME statement; however, you must be familiar with TSO commands and with DCB (data control block) attributes in order to use the ALLOCATE command effectively. Here is a typical ALLOCATE command for the SASUSER library that provides satisfactory performance at many sites:
alloc fi(newlib) da('abc.my.sasuser') new catalog space(80 20) dsorg(ps) recfm(f s) blksize(6144) reu
When you enter this ALLOCATE command from the READY prompt, a physical file named ABC.MY.SASUSER is created with the correct attributes for a SAS data library.
In order to use the new SAS data library as the SASUSER
library, you must end your SAS session and start a second session. When you
start a second session, you can use the SASUSER CLIST operand to specify ABC.MY.SASUSER
as the SASUSER library. (See the next section.)
After creating your own permanent SAS data library, designate that library as your SASUSER library. You can do this in either of the following ways:
sas sasuser('''abc.my.sasuser''')
When you enter this command, the libref SASUSER is associated with the SAS data library whose physical file name is ABC.MY.SASUSER. Any profile changes that you make during your session are saved in the SAS catalog SASUSER.PROFILE, which is a member of the SASUSER library. These changes will be retained when you end your SAS session.
Both of these methods require that you identify the SAS data library when you invoke SAS; you cannot change the SASUSER library during a SAS session.
SAS System Options |
After a system option is set, it affects all subsequent
DATA and PROC steps in a process until it is specified again with a different
value. For example, the CENTER|NOCENTER option
affects all output from a process, regardless of the number of steps in the
process.
sas options('option-list')
For options that can be on or off, just list the keyword that corresponds to the appropriate setting. For options that take a value, list the keyword identifying the option followed by an equal sign and the option value, as in the following example:
sas options('nodate config=myconfig')
// EXEC SAS,OPTIONS='option-list'
For example:
// EXEC SAS, // OPTIONS='OPLIST LS=80 NOSTATS'
For example:
options nodate linesize=72;
See Summary of All SAS System Options Available under OS/390 to find out whether a particular option can be specified in the OPTIONS statement. For more information about autoexec files, see Autoexec Files. For more information about the OPTIONS statement, see SAS Language Reference: Dictionary and SAS Language and Procedures: Usage.
The purpose of the default options table is to replace SAS system option defaults with values that are more appropriate for your site. You can change these new defaults in the same way that you can change the defaults provided with the SAS System.
The purpose of the restricted options table is to control the values of invocation-only system options, which can be specified only when you invoke SAS. These values cannot be overridden. However, the restricted options table will accept specifications for any system option, including those that can be specified at any time during the SAS session. These specifications can be overridden at any time. To see when you can specify a value for a particular system option, refer to the Summary Table of SAS System Options.
You can determine where host options get their values by using the VALUE parameter of the OPTIONS procedure. For example, submit:
proc options host value; run;Then check the field named How Option is Set to determine if the value is the shipped default, or if the value was set in the default options table, or if the value was set in the SAS configuration file.
Contact your local SAS Support Consultant for more information.
Some options may seem to have default values even though the default value listed in Summary of All SAS System Options Available under OS/390 is none. This happens when the option is set in a system configuration file, in the default options table, or in the restricted options table.
You can use the VALUE parameter of the OPTIONS procedure
to see when an option's value was set.
proc options short; run;To list all the options in a certain category, use the GROUP= option:
proc options group=sort; run;
Under OS/390, PROC OPTIONS also supports some additional
options for listing system options that are specific to SAS/ACCESS interfaces
or to the SAS interface to ISPF. See OPTIONS for details.
To display the OPTIONS window, enter
OPTIONS
from a command
line. The OPTIONS window displays the settings of many SAS system options.
When the same option is set in more than one place, the order of precedence is as follows:
For example, options that you specify during your SAS session (using the OPTIONS statement or OPTIONS window) take precedence over options that you specified when you invoked SAS. Options that you specify with the SAS CLIST command take precedence over settings in the configuration file. The settings in the user configuration file take precedence over settings in the system configuration file and in the default options table.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.