SAS Component Language Dictionary |
Store a value in a SAS macro variable
CALL SYMPUT(macro-var,cval);
|
CALL
SYMPUTN(macro-var,nval);
|
-
macro-var
-
is the macro variable to store a
value in.
Type: Character
-
cval
-
is the character value for SYMPUT
to store in macro-var.
Type: Character
-
nval
-
is the numeric value for SYMPUTN
to store in macro-var.
Type: Numeric
SYMPUT stores a character value in a SAS
macro variable, whereas SYMPUTN stores a numeric value in a SAS macro variable.
If macro-variable does not exist, SYMPUT and
SYMPUTN create it. SYMPUT and SYMPUTN make a macro variable assignment when
the program executes.
Store the value of the SCL variable SCLVAR
in the macro variable TBL:
call symput('tbl',sclvar);
Store the numeric value 1000 in the macro
variable UNIT:
call symputn('unit',1000);
SYMGET and SYMGETN
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.