i finally came across the answer. data a; infile 'C:\Users\___\Desktop\test1.txt' truncover; input info $30.; name = put(reverse(substr(reverse(info),findc(reverse(info),'F''M')+1)),$8.); sex = put(substr(info, length(name) +1, 1),$1.); age = input(substr(info, anydigit(info),2),2.); ht=substr(info, sum(length(name),4), 4); if ht>=100 then ht=substr(ht,1,2); height=input(ht,4.); weight= input(substr(info, sum(length(name),4,length(ht))),5.); drop info ht; run;
... View more