|SAS Companion for the OS/390 Environment|
Whether you are using interactive processing under TSO or batch processing, you may want to customize certain aspects of your SAS session. For example, you may want to change the line size or page size for your output, or you may want to see performance statistics for your SAS programs.
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.
A configuration file contains SAS system options that are set automatically when you invoke SAS. SAS uses two types of 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:
For example, a configuration file might contain the following lines:
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:
//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
Under OS/390, an autoexec file can be either a sequential data set or a member of a partitioned data set. Unlike configuration files, which contain SAS system options, an autoexec file contains SAS statements. These statements are executed immediately after SAS has been fully initialized and before any SAS input source statements have been processed. For example, an autoexec file could contain the following lines:
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 statements that
are submitted from an autoexec file usually
are not displayed in the SAS log. However, if you specify the ECHOAUTO system
option when you invoke SAS, then SAS writes (or "echoes") the autoexec statements
to the SAS log as they are executed.
Under TSO, use the AUTOEXEC operand when you invoke SAS to tell SAS where to find your autoexec file. For example, the following command invokes SAS and tells SAS to use an autoexec file named MY.EXEC.FILE:
To specify an autoexec file in a batch job, use a JCL DD statement to assign the DDname SASEXEC to your autoexec file. This DD statement must follow the JCL EXEC statement that invokes the SAS cataloged procedure. For example, the following two lines of JCL can be used to accomplish the same results in a batch job as the previous example did under TSO:
//MYJOB EXEC SAS //SASEXEC DD DSN=MY.EXEC.FILE,DISP=SHR
The SASUSER library contains SAS catalogs that enable you to customize certain features of SAS while your SAS session is running and to save these changes. For example, in base SAS software, any changes that you make to function key settings or to window attributes are stored in a catalog named SASUSER.PROFILE. The SASUSER library can also contain personal catalogs for other SAS software products. You can also store SAS data files, SAS data views, SAS programs, SAS/ACCESS descriptor files, and additional SAS catalogs in your 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
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:
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|
SAS system options control many aspects of your SAS session, including output destinations, the efficiency of program execution, and the attributes of SAS files and data libraries.
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
The default values for SAS system options are appropriate for many of your SAS programs. If you need to specify or change the value of a system option, you can do so in the following ways:
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'
// EXEC SAS, // OPTIONS='OPLIST LS=80 NOSTATS'
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.
Your local SAS Support Consultant may have created a default options table or a restricted options table. Information on creating and maintaining these tables is provided in the installation instructions for the SAS System in the OS/390 environment.
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.
To display the current settings of SAS system options, use the OPTIONS procedure or the OPTIONS window.
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.
The OPTIONS procedure writes to the SAS log all system options that are available under OS/390. By default, the procedure lists one option per line with a brief explanation of what the option does. To list the options with no explanation, use the SHORT option:
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.
Top of Page
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.