Thanks data_null.For the reply to the post. I am unable to view my post Its telling unauthorised access. Might be technical bug. Can u just clarify the steps infile cards col=c; How to import delimited space text file created by data_null_; in Data Management - View the full discussiondata pita; infile cards col=c; input id :$3. @; call scan(_infile_,-2,s,l,' '); l=s-c-1; input name $varying64. l dob:mmddyy12. money :comma12.; format dob mmddyy10. money dollar12.; drop s l; list; cards; 001 Christopher Mullensc 11/12/1955 $45,200 002 Michelle Kwo 9/12/1955 $78,123 003 Roger W. McDonald 1/1/1960 $107,200 ;;;; run; proc print; run; |
Since your name field is not followed by 2 or more delimiters (spaces) you cannot use the & format modifier to read the field with embedded delimiters you will need another way to figure out the location of the end of the name field. We know that there are two fields to the right of the NAME field and we will use that information (the starting column of the date field) to find the end of the name field.
Thanks a lot.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.