BookmarkSubscribeRSS Feed
ashishdubey
Calcite | Level 5

Hi All,

 

Need your help for the following quries regaring delimiter end of record.

my source is unix file , having record delimiter (end of record) as "\r\n\n\n"  i.e CRLFLFLF" .

eg  record 1

   field A1 value

   field A1 value

   delim "\r\n\n\n".

 

Is there any limitations in SAS to have only CR or LF or CRLF only as record delimiter (End of record). Please suggest  , how to have end of record as "\r\n\n\n"

 

Thanks,

 

3 REPLIES 3
Ksharp
Super User
Check options termstr=


data have;
infile 'c:\temp\have.csv'  termstr=crlf ;
..........


ashishdubey
Calcite | Level 5
Thanks Xia ,

my end delimiter is crlflflf i.e \r\n\n\n .. could you please suggest if your solution will work in this case
Ksharp
Super User
I think you can use termstr=crlf to import such file.
If not , maybe you need to get rid of those extra \n .

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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
  • 3 replies
  • 1488 views
  • 1 like
  • 2 in conversation