I just want to loop through a list and run a procedure using the 'i'th element in the list, and make some table named 'i' with the result. I've tried the syntax from every resource I can find but can't get this to work. Here's some code/pseudocode that illustrates my need. Many thanks in advance!
array itemlist[*] (100,101,102);
proc sql;
do i=1 to dim(itemlist);
create table somelibname.[itemlist(i)] as
select * from somelibname.sometable
where item=itemlist(i);
end;
quit;