Hello everyone,
I have created a macro (supp_waterfall) which is used to calculate the number of records dropped (RecDrop) at every suppression step. There are 16 suppression steps so the macro will be executed 16 times.
The goal is to create 16 macro variables holding 16 drop counts. But I am not sure how to create and keep these 16 macro variables and their values. I would like to use them to calculate the drop total later in the program.
Below is the portion of the code related to the drop count variable:
%macro supp_waterfall (supp_file, supp_out, numstart, rptorder);
/*pass in the input file, output file, record begin, report order */
data &supp_out
set &supp_file;
if _n_=1 then do;
~~
RecDrop=&numstart-RecKept;
CALL SYMPUT('Drop&rptorder',RecDrop);
~~
%mend;
%supp_waterfall(&supp_file, &supp_out, &numstart, &rptorder1, &numrecs);
RecDrop is the variable I would like to keep for each of the 16 times this macro is executed. I have no idea how to create a macro variable for it so I tossed in the 'call symput' in there. I get syntax error for it.
I attached '&rptorder' to the end of the variable DROP as an unique identifier for the 16 drop counts. So &rptorder goes from 1 to 16. rptorder is hardcoded and passed into the macro. Everything works except the CALL SYMPUT statement, which gives me a syntax error.
I hope i have given enough information for anyone to trouble shoot. Any suggestions will be greatly appreciated.
Thank you!
... View more