![]() Chapter Contents |
![]() Previous |
![]() Next |
| SYMGETN |
| Type: | SCL function | |||
| See also: |
|
| Syntax | |
| Details | |
| Comparisons | |
| Example | |
| Storing a Macro Variable Value as a Numeric Value In an SCL Program | |
Syntax |
| SCL-variable=SYMGETN('macro-variable'); |
| Details |
SYMGETN returns the value of a global macro variable as a numeric value and stores it in the specified numeric SCL variable. You can also use SYMGETN to retrieve the value of a macro variable whose name is stored in an SCL variable. For example, to retrieve the value of SCL variable UNITVAR, whose value is 'UNIT':
unitnum=symgetn(unitvar)SYMGETN returns values when SCL programs execute. If SYMGETN cannot locate macro-variable, it returns a missing value.
To return the value stored in a macro variable when an SCL program compiles, use a macro variable reference in an assignment statement:
SCL variable=¯o-variable;
Note: It is inefficient to use
SYMGETN to retrieve values that are not assigned with SYMPUTN and values that
are not numeric. ![[cautionend]](../common/images/cautend.gif)
| Comparisons |
| Example |
This statement stores the value of the macro variable UNIT in the SCL variable UNITNUM when the SCL program executes:
unitnum=symgetn('unit');
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.