Previous Page | Next Page

Initializing and Configuring SAS Software

Customizing Your SAS Session

Overview of Customization

Whether you are using interactive processing under TSO or batch processing, you might want to customize certain aspects of your SAS session. For example, you might want to change the line size or page size for your output, or you might want to see performance statistics for your SAS programs.

You can customize your SAS sessions by setting SAS system options that control SAS behavior. For more information about SAS system options, see System Options under z/OS.

Customizing Your SAS Session at Startup

You can customize your SAS session in five ways:

See Precedence for Option Specifications for information about the order of precedence for options specified using these methods.

Configuration Files

Overview of Configuration Files

A configuration file contains SAS system options that are set automatically when you invoke SAS. SAS uses two types of configuration files:

Creating a User Configuration File

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. It can have any record length, and either fixed length or variable length records. Embedded configuration files (those specified via the CONFIG= option inside a configuration file) can also be in a UFS directory.

Format of a Configuration File's Contents

Each line of a configuration file can contain one or more system options or comments. If you specify more than one system option on a line, use either a blank space or a comma to separate the options. If the file has the legacy configuration file format of LRECL=80 and RECFM=FB, then only columns 1-72 are used. The contents of columns 73-80 are ignored. If the file has any other format, then the entire line is used.

Two different types of comments are supported. If a line contains an asterisk in column one, then the entire line is a comment. If a comment of this type requires multiple lines, each line must begin with an asterisk. Comments beginning with /* and ending with */ can appear anywhere between option specifications, but cannot be imbedded within an option specification. Comments of this type can continue across line boundaries.

Note:   An */ that ends a comment cannot be in column one. If it is in column one, it starts a separate comment for the entire line.  [cautionend]

Some options can be on (enabled) or off (disabled). Specifying only the keyword enables the option, and specifying the keyword prefixed with NO disables the option. For example, a configuration file might contain the following option specifications to disable the options:


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.  [cautionend]

A configuration file can contain the CONFIG= option. A CONFIG= option in a configuration file can name a single ddname, data set name, or UFS filename. It cannot name a list of config files. The contents of the named config file are logically inserted in place of the CONFIG= specification. If a CONFIG= option specifies a file that has already been read as a configuration file, a warning message is written to the log and the file is not read again during this session.

The configuration file is processed as if all of the lines (other than comments) were concatenated into a single string with one blank space separating the lines, which means that options whose value can contain blank spaces can be continued across line boundaries. For example, the specification of the option in the following example is on five separate lines, but it would be processed as if it is on one line:


In cases where separating concatenated lines with a blank space is not suitable, two alternative methods of explicit concatenation are provided.

For example, the following option specification is invalid because a blank space is inserted between the equal sign and the value.

The following option specification is valid because the value is concatenated immediately following the equal sign, and a blank space is not inserted.


Specifying a User Configuration File

To tell SAS where to find your user configuration file, do the following:

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, the SASRX exec, or the SAS cataloged procedure concatenates the file that you specified to the system configuration file.

During initialization, the specified value of the CONFIG= option is replaced with the list of all configuration files that are actually processed. PROC OPTIONS displays this new value.

Note:   SAS system options that you specify in the user configuration file override system options that are specified in the system configuration file.  [cautionend]

Autoexec Files

Overview of Autoexec Files

Under z/OS, an autoexec file can be a sequential data set, a member of a partitioned data set, or a UFS file. 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 '';
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 z/OS for information about SAS system options and where they can be specified.  [cautionend]

Displaying Autoexec Statements in the SAS Log

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.

Using an Autoexec File under TSO

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:

sas autoexec('''my.exec.file''')

Using an Autoexec File in Batch Mode

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:



Overview of the SASUSER Library

SAS enables you to customize certain features while your SAS session is running and to save these changes. The SASUSER library contains various SAS files in which SAS records these settings. 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. 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. For information about the FORM subsystem, see Using the PRINT Command and the FORM Subsystem and the SAS Language Reference: Dictionary.

You can use three methods to set up your SASUSER library:

If you are running SAS under TSO and you want to specify SASUSER in your SAS config file, then you need to specify the SASRX option NOSASUSER to prevent SASRX from allocating the SASUSER library before the config file is processed. This specification is available only if you are using SASRX. It is not available if you are using the CLIST because the CLIST does not have the NOSASUSER option.

Creating Your Own SASUSER Libraries

By creating your own SASUSER libraries, you can customize SAS software 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.

To create this user profile, you must first create a SAS library that can be used as the SASUSER library. The easiest way to create this library is to start a SAS session and then use a LIBNAME statement to create the library, as explained in Assigning SAS Libraries Internally. For example, to create a SAS library with a physical filename of ABC.MY.SASUSER, submit the following LIBNAME statement:

libname newlib '' 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 a physical file for use as your SASUSER library. By using the ALLOCATE command, you can avoid using the LIBNAME statement. However, to use the ALLOCATE command effectively, you must be familiar with TSO commands and with DCB (data control block) attributes. Here is a typical ALLOCATE command for the SASUSER library that provides satisfactory performance at many sites:

alloc fi(newlib) da('') 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 library.

To use the new SAS 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 option of the SAS CLIST or SASRX exec to specify ABC.MY.SASUSER as the SASUSER library.

Specifying Your Own SASUSER Library

After creating your own permanent SAS library, designate that library as your SASUSER library. You can do this in either of the following ways:

Both of these methods require that you identify the SAS library when you invoke SAS; you cannot change the SASUSER library during a SAS session.

SAS System Options

Overview of 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 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 process.

Specifying or Changing System Option Settings

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:

Determining How an Option Was Set

Because of the relationship between some SAS system options, SAS might modify an option's value. This modification might change your results.

To determine how an option was set, enter the following code in the SAS Program Editor:

proc options option=option value; run;

After you submit this code, the SAS log will display the value that was set for the option, and how the value was set. For example, the following log message is displayed when you enter

proc options option=CATCACHE value; run;

Results of the OPTIONS Procedure for the CATCACHE Option

Option Value Information for SAS Option CATCACHE
      Option Value:  0
      Option Scope:  NoReb
      How option value was set:  Shipped Default

Contact your on-site SAS support personnel for more information.

Default Options Table and Restricted Options Table

Your on-site SAS support personnel might have created a default options table or a restricted options table. information about creating and maintaining these tables is provided in the configuration guide for SAS software in the z/OS environment.

The default options table is created by your site administrator and provides a global set of defaults that are specific to your site. It reduces the need to duplicate options in every system config file at your site.

The restricted options table is created by the site administrator. It specifies option values that are established at startup and cannot be overridden. If an option is listed in the restricted options table, any attempt to set it is ignored. An attempt to set it with the options statement causes a warning message to be written to the log. For example

1    options vsamload;
WARNING 36-12: SAS option VSAMLOAD is restricted by your Site Administrator and 
cannot be updated.

To find out which options are in the restricted options table, submit this statement:


For a list of restricted options, see Restricted Options in SAS Language Reference: Dictionary.

Some SAS system options cannot be added to a restricted options table. To find out whether an option can be restricted, run PROC OPTIONS with the DEFINE option. For example:


The output that is returned by the preceding statement will include either of the following messages:

Your Site Administrator can restrict modification of this option.


Your Site Administrator cannot restrict modification of this option.

If an ineligible option has been placed in the restricted options table, the following message is issued:

SAS option option-name cannot be restricted by your Systems Administrator.

SAS terminates with an abend. If you receive such an error, you should immediately notify your site administrator.

Displaying System Option Settings

To display the current settings of SAS system options, use the OPTIONS procedure or the OPTIONS window.

Some options might seem to have default values even though the default value listed in Summary of All SAS System Options Available under z/OS 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.

OPTIONS Procedure

The OPTIONS procedure writes system options that are available under z/OS to the SAS log. 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;

To list all the options in a certain category, use the GROUP= option:

proc options group=sort;

Some options, such as system options that are specific to SAS/ACCESS interfaces or to the SAS interface to ISPF, are listed only if you specify the GROUP= option. See OPTIONS Procedure: z/OS for details.


To display the OPTIONS window, enter OPTIONS on a command line. The OPTIONS window displays the settings of many SAS system options.

Precedence for Option Specifications

When the same option is set in more than one place, the order of precedence is as follows:

  1. restricted options table, if there is one

  2. OPTIONS statement or OPTIONS window

  3. SAS invocation, including invocation by way of an EXEC SAS JCL statement (in batch) or by way of the SAS CLIST or SASRX exec commands (under TSO)

  4. user configuration file, if there is one

  5. system configuration file (as SAS software is initialized)

  6. default options table, if there is one

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 or SASRX exec commands 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.

Note:   Options that are specified in the restricted options table can be updated only by your SAS administrator.  [cautionend]

Previous Page | Next Page | Top of Page