Hi Have a look at the code below. the first DATA Step creates some data according to what you mentioned. The second DATA Step reads the data from the text file using a semicolon as a delimiter for the firstname, lastname combination. The SCAN function then separates the two names. filename sugus temp; data _null_; file sugus; put "Sanjeev,Kuridi ;Ramesh ,varma;Rajesh,kumar"; run; data want; infile sugus dlm=";"; input fullName : $256. @@ ; length firstName $ 64 lastName $ 64 ; firstName = scan(fullName, 1, ","); lastName = scan(fullName, 2, ","); run; filename sugus clear;
... View more