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 ;
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.