SASAUTOS System Option: UNIX

Specifies the autocall library.
Valid in: configuration file, SAS invocation, OPTIONS statement, SAS System Options window, SASV9_OPTIONS environment variable
Categories: Environment control: Files

Macro: SAS macro

PROC OPTIONS GROUP= ENVFILES

MACRO

Default: SASAUTOS fileref
UNIX specifics: syntax for specifying multiple directory-specifications
See: SASAUTOS= System Option in SAS Macro Language: Reference

Syntax

-SASAUTOS 'directory-specification' | fileref
-SASAUTOS ('directory-specification1' | fileref1,...,'directory-specification-n' | filerefn)
-NOSASAUTOS
SASAUTOS='directory-specification' | fileref
SASAUTOS =('directory-specification1' | fileref1,...,'directory-specification-n' | filerefn)
NOSASAUTOS

Required Arguments

directory-specification
specifies a pathname to an autocall macro library.
fileref
specifies a name (shorthand reference) that has been assigned to an autocall macro library.
Note that the SASAUTOS option uses filerefs, not librefs.

Details

Each autocall macro library consists of files in a UNIX directory. The directory-specification can be the pathname of a UNIX directory, a fileref, or an environment variable.
If you specify the pathname of a directory, you must enclose the name in quotation marks. You can omit the quotation marks only if you are specifying the option in the configuration file, in the SAS command, or in the SASV9_OPTIONS environment variable, and if the name cannot be taken to be a fileref.
If you specify a fileref, you must define it before attempting to use any of the autocall macros. You can define the fileref in a FILENAME statement, in an environment variable, or with the FILENAME function. See Assigning Filerefs to External Files or Devices with the FILENAME Statement.
How you specify multiple directory names, filerefs, or environment variables depends on where you specify the SASAUTOS option:
  • If you specify the SASAUTOS option in the configuration file or in the SASV9_OPTIONS environment variable, use either multiple SASAUTOS options, or enclose the directory names in parentheses. Separate the names with a comma or a blank space.
  • If you specify the SASAUTOS option in the SAS command, use the APPEND or INSERT system options to append to the end or insert at the beginning of the current SASAUTOS value. For example, the following code adds /users/userid/also to the end of the current SASAUTOS value, /users/userid/here:
    sas -sasautos /users/userid/here -append sasautos /users/userid/also
    For more information, see APPEND= System Option in SAS System Options: Reference, and INSERT= System Option in SAS System Options: Reference.
  • If you specify the SASAUTOS option in the OPTIONS statement or in the SAS System Options window, you must enclose the directory names in parentheses. Separate the names with a comma or a blank space.
At configuration time, SAS concatenates all directories specified for SASAUTOS. However, after the session starts, any new directories that you specify override any current autocall libraries.
The NOSASAUTOS option causes SAS to ignore all previous SASAUTOS specifications (whether specified in the SAS command, in the configuration file, or in the SASV9_OPTIONS environment variable).
The default value of the SASAUTOS option is the SASAUTOS fileref. There is no UNIX directory assigned to the fileref, so you must define the SASAUTOS fileref if you want to use it as your autocall library.

Examples

Example 1: Specifying Multiple Environment Variables in the OPTIONS Statement

The following example shows the syntax to use if you are specifying multiple environment variables in the OPTIONS statement:
options sasautos=(AUTODIR, SASAUTOS);
The environment variables that you specify must be defined. For example, you could define the AUTODIR environment variable at SAS invocation by using the following code:
-set AUTODIR /tmp/sasautos
For more information about how to define an environment variable, see SET System Option: UNIX.

Example 2: Specifying a Fileref in the OPTIONS Statement

The fileref that you specify must be defined. For example, you could define the AUTODIR fileref using a FILENAME statement:
filename AUTODIR '/tmp/sasautos';
Once the fileref is defined, you can use it in an OPTIONS statement to set the autocall library.
options sasautos=AUTODIR;

See Also

System Options:
INSERT= System Option in SAS System Options: Reference
APPEND= System Option in SAS System Options: Reference
MAUTOSOURCE System Option in SAS Macro Language: Reference
MRECALL System Option in SAS Macro Language: Reference