Tom,
I tried your code. No success.
I suppose that your code adds '0D'x (CR) to the end of text lines.
It does not replaces embedded '0D'x (CR) with '|'.
Oleg.
The example works find on Unix. If you are running on Windows then it might not work without adding TERMSTR=LF to the INFILE statement.
Tom,
thanks a lot for your help.
It works fine with TERMSTR=LF on Windows.
Oleg.
I have similar scenario - we get a csv file where some records are wrapped and spanned over couple of lines, instead of single line.
Also, some of this wrapped lines do not have CRLF, so TERMSTR option is not working. I dont think we can change anything on the source side. Please see some sample recs below, record starts with 50001 is first record, Next record is 60001. I added CRLF just to show how it looks. Is there anyway we can process/ read the file ?
50001,"1233243411","LN","2015-06-05-11.29.14.339000","Please consider this as the text on page 1. CRLF
Please provide copy of the page, with date and location, for testing purporse
hardship.",,"X","845783457FSDF","453454HJGHGHGJ",,CRLF
60001,"1234567897","LC","2015-03-05-11.29.14.339000","We receive some xt",,'T', ","845783457FSDF","453454HJGHGHGJ",CRLF
infile "filename06.csv" delimiter = "," MISSOVER DSD lrecl=32767
end=last ;
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.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.