September 2019
Beginner to intermediate
346 pages
7h 35m
English
Macro variable resolution with library name usage is best resolved using a period.
However, you don't always need a period when the library name is derived from a macro variable:
OPTIONS SYMBOLGEN MPRINT;%Let Libref = WORK;Data &Libref.Class_Alt; Set Class;Run;
No issues are experienced when resolving the macro variable in this way. We get the following message in the LOG:
75 %Let Libref = WORK;76 SYMBOLGEN: Macro variable LIBREF resolves to WORK77 Data &Libref.Class_Alt;78 Set Class;79 Run; NOTE: There were 12 observations read from the data set WORK.CLASS.NOTE: The data set WORK.WORKCLASS_ALT has 12 observations and 5 variables.
We will now use the macro variable in the SET statement and see what happens ...
Read now
Unlock full access