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

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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