Hi,
I have a macro which takes a single dataset as input(test ) and does manipulations and creates 4 datasets match02a ,notmatch02a, match02b,notmatch02B.
%macro enhance;
data test1;
set test;
where condition =xxx;
run;
data test2;
set test;
where condition =yyy;
run;
data match02a notmatch02a;
set test1;
/* manipulations*/
run;
data match02b notmatch02b;
set test2;
/* manipulations*/
run;
%mend enhance;
%enhance
I am trying to pass a list of dataset to the above macro and create specific output for each dataset
Below is the another macro which I am using to split the dataset test into 3 datasets depending on the country name..When I execute the below macro I get three temporary datasets : out_country1, out_country2,out_country3.
%macro temp1;
/* define which libname.member table, and by which column */
%let TABLE= test;
%let COLUMN=country;
proc sql noprint;
/* build a mini program for each value */
/* create a table with valid chars from data value */
select distinct
cat("out_",compress(&COLUMN.,,'kad'),"(where=(&COLUMN.=",quote(&COLUMN.),"))") into :allsteps separated by ' '
from &TABLE.;
quit;
%put NOTE: &allsteps.;
data &allsteps.;
set &table;
run;
%mend temp1;
%temp1;
I need to passing these three datasets (out_country1, out_country2,out_country3. ) to enhance macro to create 4 datasets from each
match02a_country1 ,notmatch02a_country1, match02b_country1,notmatch02B_country1.
match02a_country2 ,notmatch02a_country2, match02b_country2,notmatch02B_country2.
match02a_country3 ,notmatch02a_country3, match02b_country3,notmatch02B_country3.
How do I pass the datasets as a parameter to enhance macro and generate output for each? is it possible to loop over these datasets and pass this as a parameter?
It will be great if you can guide me here
... View more