Curiosity killed the cat with me and I came up with the method I would use: data Basic1; length Rec $ 1000 Name $ 200 Age 8 Gender $ 1 Email $ 20; drop rec; infile "...your path...\Address.txt" end=last; input ; rec = _infile_; If index(rec,'Name:')>0 then do; Name = strip(scan(rec,2,":")); Age = .; Gender = ""; Email = ""; end; else if index(rec, 'Age:')>0 then Age = put(scan(rec,2,":"),8.); else if index(rec, 'Gender:')>0 then Gender = strip(scan(rec,2,":")); else if index(rec, 'Email:')>0 then Email = strip(scan(rec,2,":")); retain Name Age Gender Email; if rec = "" or last = 1 then output; run; I think this accomplishes what you need. EJ
... View more