This action is analogous to defining a Windows environment variable with the Windows
SET command. One way to use the SET system option is to set up environment variables
that represent commonly used external files. For
example, the following code defines an environment variable for the sample source
library:
-set sampsrc (!sasroot\base\sample
!sasroot\stat\sample
!sasroot\graph\sample)
When you refer to SAMPSRC
as a library name during your SAS session, SAS automatically assigns
the library with the directories listed. Note that !sasroot is also a SAS environment variable that represents the root directory of your SAS
installation, and is typically assigned in the SAS configuration file.
Environment variables only can be used as a libref if you use the SET system option
at SAS invocation and not in an OPTIONS statement.
If you specify SET on the command line when you start SAS, the variable is set only
for that SAS session. To set an environment variable for repeated use, either add
the SET system option to your configuration file or create a Windows environment variable.
You can use the APPEND
and INSERT system options to add additional file specifications.
Note: The words AUX, CON, NUL,
LPT1 - LPT9, COM1 - COM9, and PRN are reserved words under Windows.
Do not use CON or NUL as environment variable names.