SET System Option: UNIX

Defines an environment variable.
Valid in: configuration file, SAS invocation, OPTIONS Statement, SASV9_OPTIONS environment variable
Category: Environment control: Files
PROC OPTIONS GROUP= ENVFILES
Default: none
UNIX specifics: all

Syntax

–SET variable-name value
SET=variable-name value

Details

The SET option lets you define an environment variable that is valid within the SAS session and any shell started from within the SAS session. Using the SET option is similar to using the SAS setenv command. For information about executing system commands from within your SAS session, see Executing Operating System Commands from Your SAS Session.
A special use for the SET option is to specify the name of the !SASROOT directory:
-set SASROOT pathname
The pathname specified can then be used to expand !SASROOT (as shown in Character Substitutions in Pathnames).
After exiting your SAS session, environment variables that are set with the SET option no longer exist.