macro variables in sas

Adarsha Regmi
Dec 13, 2021

macro variables are global variables that can be used in different locations.. It an modify sas statements in data, proc steps;

types of variables

a) automatic <build when a sas session is created and remains till session is closed>

b) user-defined (user defines these)

  • * it can be stoerd either in global symbol table or in a local symbol table.

the variables stored in open code reside in global symbol table whereas

those created in macro programs are stored in either local or global.

eg

%let value =ram;

getting the data

&value;

we may use of period, colon to segregate the macro variable referencing.



%put &value.1;
-> Note: ram1

--

--