I have a list of company IDs and Dates and I want to run a macro on this list in such a way that for each date all the company IDs need to be considered as my macro filter.
For example, my list is -
DATA comp_date_list;
INPUT compno sdate;
DATALINES;
12490 20090120
87432 20090120
24643 20090120
87432 20090119
12490 20090105
24643 20090105
;
proc print data=comp_date_list;
run;
Now, I have a macro that is as follows -
%macro1(compno=,sdate=,threshold=,fdate=,edate=)
Now The macro has to run for every comp-date combination in my list. But since this is to run on a very large dataset, running it n times will take a long time. So to reduce the runtime, I plan to make a list of compnos for a given date and alter my macro to produce the results for a date.
Now my question is how to create a macro variable that has all the compnos for a given date and which alters as date changes? am new to macro writing and SAS. So please excuse my ignorance. Thanks!
by
processing is usually far more efficient than using a macro to iterate over all your values/parameters, providing you can construct your code appropriately. Can you provide an example of the macro1 code? – Chris J