your probably looking for a type of array where you can do something like the following: The number of row variables will change so SAS doesn't know how many to create which will be an issue, if you have an idea of the max, set it to that. Or use an earlier dataset to create a macro variable with the largest number of = sign. Here's an example: data _null_; set edc_recipe end=eof; retain max=0; nr=countc(recipe_parameters_1, "="); if nr>max then max=nr; if end then call symput ('maxc', max); run; %put &maxc.; data test_table ; set edc_recipe; Nr = countc(RecipeParameters_1,'='); array row{&maxc} row1-row&maxc; do L = 1 to Nr; Row(L) = scan(RecipeParameters_1,2,'='); Row(L) = substr(Row_L,1,length(Row_L) - 2); end; run;
... View more