BookmarkSubscribeRSS Feed
Sanchit_goyal
Calcite | Level 5

How many delimiters can we define in dlm = '' option in the infile statement ?

4 REPLIES 4
Sanchit_goyal
Calcite | Level 5
but there is a specific number to it right, like I guess 200 or 256 delimiters we can mention in delimiter option in the infile statement
Kurt_Bremser
Super User

Well, with 256 delimiters there's nothing left to delimit, so that's not even a limit that makes sense.

For all practical purposes, there is no limit you need to take care of, and there is none mentioned in the documentation.

ballardw
Super User

@Sanchit_goyal wrote:
but there is a specific number to it right, like I guess 200 or 256 delimiters we can mention in delimiter option in the infile statement

Delimiters are single character. So too many delimiters, to get to 200 you would exhaust every letter, digit and punctuation character, means practically every character is a delimiter. Which is likely to be particularly useless as you would not have much data when done. 

Examine the result of this code using many delimiters:

data example;
   infile datalines dlm=' abcdefABCDEF123456' missover;
   input x $   ;
datalines;
abc
123
a1b2c3
aaa 333
;

 

Or are you wanting the DLMSTR option where groups of characters are a single delimiter?

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 4 replies
  • 502 views
  • 1 like
  • 3 in conversation