![]() Chapter Contents |
![]() Previous |
![]() Next |
| SYMPUTN |
| Type: | SCL routine | |||
| See also: |
|
| Syntax | |
| Details | |
| Comparisons | |
| Example | |
| Storing the Value 1000 in The Macro Variable UNIT When the SCL Program Executes | |
Syntax |
| CALL SYMPUTN('macro-variable',value); |
| Details |
The SYMPUTN routine assigns a numeric value to a global SAS macro variable. SYMPUTN assigns the value when the SCL program executes. You can also use SYMPUTN to assign the value of a macro variable whose name is stored in an SCL variable. For example, to assign the value of SCL variable UNITNUM to SCL variable UNITVAR, which contains 'UNIT', submit the following:
call symputn(unitvar,unitnum)
You must use SYMPUTN with a CALL statement.
Note: It is inefficient
to use an ampersand (
&) to reference a macro variable that was created
with CALL SYMPUTN. Instead, use SYMGETN. It is also inefficient to use CALL
SYMPUTN to store a variable that does not contain a numeric value. ![[cautionend]](../common/images/cautend.gif)
| Comparisons |
| Example |
This statement stores the value 1000 in the macro variable UNIT when the SCL program executes:
call symputn('unit',1000);
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.