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.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.