Chapter Contents |
Previous |
Next |
OPTGETC and OPTGETN |
Category: | SAS System Option |
Syntax | |
Details | |
Examples | |
Example 1: Using the OPTGETC Function | |
Example 2: Using the OPTGETN Function | |
See Also |
Syntax |
cval=OPTGETC(option-name); |
nval=OPTGETN(option-name); |
Type: Character
Type: Numeric
Type: Character
Details |
If you try to use OPTGETC to get information about a numeric option or OPTGETN to get information about 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 OPTGETN, because these options have the numeric value 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.
Examples |
Check to see whether new SAS tables will be compressed:
if optgetc('compress')='YES' then _msg_='Observations are compressed.'; else _msg_='Observations are not compressed.';
Return the setting of the CAPS option and place it in the column CAPS. The value returned is 0 if the NOCAPS form of the option is in effect, or 1 if CAPS is in effect.
caps=optgetn('caps');
See Also |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.