Till now, the chapter has used the keyword parameter to call a macro definition. In this method, we have used the parameter name with the equals sign and then specified the parameter value. This needs to be done at both the macro definition compiling and invoking stages.
However, we can also give positional parameters. In this method, the name of the parameter is supplied at the compilation stage and the value at the invoking stage. The order that you supply the values is crucial in the macro definition with the position parameters:
OPTIONS MLOGIC;
%macro demo_sort(File, Variable);
Data New;
Set WORK.&File;
New_Weight=&Variable*1.1;
Run;
%if &File ne “” %then
%do;
Proc Sort Data=New;
By Descending New_Weight;
Run;
%end;
%mend;
%demo_sort (Weight, Class);
%demo_sort (Class, Weight...