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 .

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 952 views
  • 1 like
  • 2 in conversation