first of all i highly apology for my silly mistake which make trouble to import data. Thanks for ur kind help,,, i believe its very helpful in my project. but my desire output is to group all four [3-6 ] convert in or rename in one common id and rest value comes infront of that. please check my effort n will wait for ur kind suggestion. ---------------------------- proc import datafile="C:\Users\loveislife\Desktop\banktest.txt" out =test dbms=dlm replace; delimiter='09'x; getnames=yes; run; data a(rename=(value=Value_A)) b(rename=(value=Value_B)) c(rename=(value=Value_C)) d(rename=(value=Value_D)); set test(keep=id year Month value); if _n_=1 then do; flag=0; y=substr(id,1,3); end; if y =substr(id,1,3) then do; y =substr(id,1,3);x="A"||substr(id,4,1); if x="A3" then output a; if x="A4" then output b; if x="A5" then output c; if x="A6" then output d; end; if y ne substr(id,1,3) then do; y =substr(id,1,3); flag=flag+1; x="A"||substr(id,4,1); if x="A3" then output a; if x="A4" then output b; if x="A5" then output c; if x="A6" then output d; end; retain flag y; drop x y; run; data new(drop =flag); merge a b c d; by flag year month; run; -------------------------------
... View more