I am looking to create multiple datasets from city_variables dataset. There are a total of 58 observations that I summed up into macrovariable (&count) to stop the do loop.
The city_variables dataset looks like (vertically ofcourse):
CITY_NAME City1 City2 City3 City4 City5 City6 City7 City8 City9 City10
I created macrovariable &name from a data null statement in order to input the cityname into the dataset name.
Any help would be great on how to automate the creation of the 48 files by name (not number). Thanks again.
/Create macro with number of observations in concordinate file/
proc sql; select count(area_name); into :count from main.state_all; quit; %macro repeat; data _null_; set city_variables; %do i= 1 %UNTIL (i = &count); call symput('name',CITY_NAME); run; From this point I want to create some datasets using Proc sql statements linking to an oracle table
create table &name as.....
from oracletable %end; %mend repeat; %repeat
I would like to be able to loop this process to create multiple datasets from the input dataset