September 2019
Beginner to intermediate
346 pages
7h 35m
English
So far, the macro variables we have formed have had no prefix or suffix attached to them. Some macro variables, however, have had a period in front of them to segregate them from the library name, like so:
%Let Out = Class_;Data &Out2013 &Out2019; Set Class; If Year EQ 2013 Then Output &Out2013; Else Output &Out2019;Run;
In a macro variable reference, the word scanner recognizes that a macro variable name has ended when it encounters a character that is not allowed in a SAS name. To enable SAS so that it can resolve the macro variable as intended, add a period after the macro variable name:
%Let Out = Class_;Data &Out.2013 &Out.2019; Set Class; If Year EQ 2013 Then Output &Out.2013; Else Output &Out.2019; ...
Read now
Unlock full access