I need to take a variable created by the output of a proc freq and use it to iterate and select several proc export files. The point is to automate a selection and output criteria.
Using the following generates 28 unique rows.
proc freq data=MatchedLeads; tables campaigngroup_name / out=OutFreq(rename=(campaigngroup_name=Selector)keep=campaigngroup_name) ; run;
Now I want to take the 28 observation, one variable (Selector) and use it to create an iterative process that will create 28 separate export files.
Currently my proc export code looks like this.
proc export data= MatchedLeads outfile="\\sysdir\exportdatamatched.xlsx" dbms=xlsx replace; run;
This just gives me one huge data set. I need it to select and export based on the results from the freq above.
... View more