Hi ballardw,
Thanks for the reply. Please find the example below
if location in (" loc1") then do;
if (c1) then A1= T1;
if (C2) then A2= T2; if location in (" loc2") then do;
if (c3) then A3= T3;
if location in (" loc3") then do;
if (c4) then A4= T4;
I have edited the orginal post and added the values for dataset A. There is no limit on the maximum number of values. I was thinking of creating a separate dataset with split values and using this dataset.
data c;
set A;
do i=1 to countw(id,',');
id_new=left(scan(id,i,','));output;
end;
keep location id_new;
run;
Regards,
Sheeba
... View more