Is this what you are tryng to do? HAVE data elements; input ELEMENT $32.; cards4; commodity date state ;;;; run;quit; WANT data commodity; element="commodity"; run;quit; data date; element="date"; run;quit; data state; element="state"; run;quit; * SOLUTION; %symdel element; data _null_; set elements; call symputx('element',element); rc = dosubl (" data &element; length element $32; element=""&element""; run;quit;"); ;run;quit; NOTE: The data set WORK.COMMODITY has 1 observations and 1 variables. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.00 seconds NOTE: The data set WORK.DATE has 1 observations and 1 variables. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.00 seconds NOTE: The data set WORK.STATE has 1 observations and 1 variables. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.00 seconds NOTE: There were 3 observations read from the data set WORK.ELEMENTS. NOTE: DATA statement used (Total process time): real time 3.32 seconds cpu time 0.23 seconds Up to 40 obs from WORK.COMMODITY total obs=1 Obs ELEMENT 1 commodity Up to 40 obs from WORK.DATE total obs=1 Obs ELEMENT 1 date Up to 40 obs from WORK.STATE total obs=1 Obs ELEMENT 1 state
... View more