DATA Step, Macro, Functions and more

Record end delimiter for a unix file in SAS

Reply
New Contributor
Posts: 2

Record end delimiter for a unix file in SAS

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,

 

Super User
Posts: 9,676

Re: Record end delimiter for a unix file in SAS

Check options termstr=


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


New Contributor
Posts: 2

Re: Record end delimiter for a unix file in SAS

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
Super User
Posts: 9,676

Re: Record end delimiter for a unix file in SAS

I think you can use termstr=crlf to import such file.
If not , maybe you need to get rid of those extra \n .

Ask a Question
Discussion stats
  • 3 replies
  • 233 views
  • 1 like
  • 2 in conversation