Can somebody explain what the following statement does?
%mBuildLookupTab1(NAME=Region_Code_Conversion,DATASET=MyData.CCAC_LHIN,KEY=Region_ID,OBJ1=Region_Code);
It executes a SAS macro named %mBuildLookupTab1 (so someone has previously created this macro, and possibly stored it in a location from which it will be called), with arguments NAME, DATASET, KEY and OBJ1 taking on the values shown.
Ok thanks.
Hi:
This code is invoking a SAS macro program definition named %mBuildLookupTab1. Someplace, there should be code that has this:
%macro mBuildLookupTab1();
...... more code .....
%mend;
The "more code" is what gets executed when the macro program is invoked. Within the parentheses in the macro definition and the macro invocation are macro parameters: NAME, DATASET, KEY, and OBJ1. Inside the %MACRO definition, the parameters are being defined. In the "more code", the macro parameters should be visible as their macro variable equivalents: &NAME, &DATASET, &KEY, and &OBJ1. Without knowing more about what is in the "more code" in the macro definition program, it's nearly impossible to tell what is happening in the macro program when it is executed.
You can turn on
options MPRINT SYMBOLGEN;
to see what the macro program is doing when you run it.
Hope this helps,
Cynthia
Thanks a lot Cynthia!
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.