Previous Page | Next Page

System Options under UNIX

AUTOEXEC System Option: UNIX

Specifies the SAS autoexec file.
Default: (see Details)
Valid in: configuration file, SAS invocation, SASV9_OPTIONS environment variable
Category: Environment control: Files
UNIX specifics: all

See Also


-AUTOEXEC file-specification | -NOAUTOEXEC

-AUTOEXEC file-specification

specifies the SAS autoexec file. The file-specification must resolve to a valid UNIX pathname.


specifies that SAS is not to process any autoexec files.


The AUTOEXEC system option specifies the autoexec file. The autoexec file contains SAS statements that are executed automatically when you invoke SAS or when you start another SAS process. The autoexec file can contain any SAS statements. For example, your autoexec file can contain LIBNAME statements for SAS libraries that you access routinely in SAS sessions.

SAS looks for this option in the following order:

  1. in the command line

  2. in the SASV9_OPTIONS environment variable

  3. in the configuration file

It uses the first AUTOEXEC option it encounters and ignores all others.

If neither AUTOEXEC nor NOAUTOEXEC is specified, SAS searches three directories for an file in the following order:

  1. your current directory

  2. your home directory

  3. the !SASROOT directory (see The !SASROOT Directory)

SAS uses the first file it finds to initialize the session.

If you want to see the contents of the autoexec file for your session, use the ECHOAUTO system option when you invoke SAS.

See Also

Previous Page | Next Page | Top of Page