SAS pre-processing for macros
SAS programs often make calls to macros that are either defined in a separate SAS macro program or in another SAS program. In such cases, Manta needs an extractor to extract all macro definitions before it analyzes SAS programs.
main_program.sas
---------------------
%setenv(env=prod); /* calling a sas macro which is defined in a seperate sas program file */
data member_master;
set eds.member_master; /* eds library defined in setenv.sas */
run;
...
...
;
setenv.sas
-----------
%macro setenv(env=);
%IF &env.=dev %Then libname eds "/opt/sas/data/dev/stage";
%IF &file_name=prod %Then libname eds "/opt/sas/data/prod/stage";
%mend setenv;
In such cases, we need the SAS extractor to extract the macro definitions before the SAS program main_program.sas is analyzed. To do so, include the SAS extraction in the workflow along with the analyze phase as shown below.
