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?

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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