SAS Component Language Dictionary |
Assign a value to a SAS system option
Category: |
SAS System Option
|
rc=OPTSETC(option-name,cval);
|
rc=OPTSETN(option-name,nval);
|
-
rc
-
contains the return code for the operation:
0 |
successful |
0 |
not successful |
Type:
Numeric
-
option-name
-
is the name of the character SAS system
option to set.
Type: Character
-
cval
-
is the new character setting for the option.
Type:
Character
-
nval
-
is the new numeric setting for the option.
For options with binary settings of ON and OFF, specify an nval of 1 to turn the option on and 0 to turn it
off.
Type: Numeric
If you try to use OPTSETC to assign a value to a numeric
option or OPTSETN to assign a value to a character option, an error message
is generated. To determine whether a SAS system option has a numeric or character
setting, see the SAS documentation for your operating environment or
SAS Language Reference: Dictionary.
For options that have ON/OFF settings (for example,
DATE/NODATE), use OPTSETN, because the options have the numeric values 1 for
ON and 0 for OFF.
You can view current option settings by using the OPTIONS
procedure in the SAS session or by using the OPTIONS command.
Set the COMPRESS option to allow compression of new
SAS tables:
rc=optsetc('compress','yes');
Turn on the CAPS option:
rc=optsetn('caps',1);
OPTGETC and OPTGETN
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.