September 2019
Beginner to intermediate
346 pages
7h 35m
English
We have already seen the use of two ampersands. In SAS, there is no limit to the number of ampersands that you can place before a macro variable. How these ampersands resolve is worth understanding. The ampersands are read from left to right by the macro processor. Remember that two ampersands will always resolve to one ampersand. Let's look at some macro variable resolutions to understand multiple ampersand resolution:
%Let Class = A;%Let N = 1;%Let Class1 = B2;%Let A1 = A1Unknown;%PUT &Class&N;%PUT &&Class&N;%PUT &&&Class&N;
In the case of single ampersands, the Class macro variable is resolved with a value of A. The N macro variable is then resolved as having a value of 1. Due to this, the combined value of the two ...
Read now
Unlock full access