04-24-2018 05:14 PM
I'm looking at a piece of code given below, this is just a small part of a really big project. But I'm unable to understand a concept here:
Proc sql noprint;
Select max(count) into:A
IF &A. < 1 THEN
Here, A is a macro variable as provided in the proc sql statements, then instead of referencing it as &A in the data step, why is this being referred to as &A.. Why is there a period added while referencing it?
04-24-2018 05:29 PM
The period is optional when referring to a macro variable. It doesn't matter if you use it here or not.
It comes in handy when the name of the macro variable is ambiguous. For example:
Is this the macro variable &A followed by the letters "BC" or is it the macro variable &ABC? For the macro variable &A followed by the letters "BC" you would clarify that by using:
04-24-2018 05:44 PM
OK, I think you need a few examples to clarify then. Try running this code: