BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Oleg_L
Obsidian | Level 7

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.

Tom
Super User Tom
Super User

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.

Oleg_L
Obsidian | Level 7

Tom,

thanks a lot for your help.

It works fine with TERMSTR=LF on Windows.

Oleg.

sasbeginner_us
Calcite | Level 5

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

 
it is a comma delimited file -

infile "filename06.csv" delimiter = "," MISSOVER DSD lrecl=32767

end=last ;

SAS Innovate 2025: Register Now

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!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 18 replies
  • 11822 views
  • 2 likes
  • 6 in conversation