September 2019
Beginner to intermediate
346 pages
7h 35m
English
Instead of applying the %STR quoting function at the start of the value of the macro variable, we can use it to quote various items in the intended macro variable value, as follows:
%LET Output = Proc Print%STR(;) Data = Class%STR(;) Where Year = 2019%STR(;) Run%STR(;);%PUT Output is &Output;
Let's look at some further uses of %STR:
%Let Name = %STR(Philip%'s);%PUT &Name;
In this instance, we are trying to mask the apostrophe and print the Name value as Philip's. If the macro quoting function isn't noticed, the macro variable will not execute. Apart from masking the full value with %STR, we have also placed a % sign in front of the character to be masked. This produces the following LOG:
SYMBOLGEN: Macro variable NAME ...
Read now
Unlock full access