Chapter Contents

Previous

Next
SET

SET



Defines a SAS environment variable

Default: None
Valid in: configuration file, SAS invocation, OPTIONS statement
Windows specifics: Values intended to represent files or paths must be valid under Windows


Syntax
Details
See Also

Syntax

-SET SAS-variablevalue | (value-1...<value-n>)
SET='SAS-variable' 'value' | "(, value-1'...<'value-n'>)"

SAS-variable
specifies the environment variable to define.

value
specifies the value or set of values to assign to the environment variable.


Details

This 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.

Note:   The words CON and NUL are reserved words under Windows. Do not use CON or NUL as environment variable names.  [cautionend]

See Also


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.