BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Patrick
Opal | Level 21

Hi all,

 

I'm struggling to understand what the SAS9.4 documentation tells me. 

 

What I'm doing is generating dynamic code by writing the code to a temporary file that I then %include. This all works fine.

 

What I'm trying to understand is how to determine the possible max. length of a single line of generated code. Reading the documentation that's defined by option s2.

Running below...

proc options option=seq;
run;
proc options option=s;
run;
proc options option=s2;
run;

....returns...

SEQ=8
S=0  
S2=0 

If I read the docu right then with s2=0 it's the value of option SEQ that determines the possible max. length of %included code. ....but I fail to understand what the docu tells me what SEQ actually does and how this interacts with s2.

Can one of you smart guys enlighten me or point me to some other part of the docu where that's explained in more detail?

 

I do know/tested in my environment that I can generate and execute a single line of code that exceeds 3000 characters with the current settings so things will work for me. But I would really like to understand the WHY.

 

Thanks, Patrick

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

The actual limits for code lines can be found here.

I take it that these options you found are for special situations (like punchcards, which provide only 80 columns, and where you regularly had sequence numbers at the beginning or end, in case someone dropped the stack).

View solution in original post

2 REPLIES 2
Kurt_Bremser
Super User

The actual limits for code lines can be found here.

I take it that these options you found are for special situations (like punchcards, which provide only 80 columns, and where you regularly had sequence numbers at the beginning or end, in case someone dropped the stack).

Patrick
Opal | Level 21

@Kurt_Bremser 

To even care about the s2 option comes from my long ago Mainframe days - so o.k. the seq option is related to very past punchcard days.

I've seen the note you've linked which honestly confused me even more as I couldn't make the connection to the documentation for S2.

 

Hmm... I still feel I don't understand. Reading the SAS Note it's sort of "don't care about s2" ...but then s2 is still fully documented also as option one can use with an %include statement. But then when I've actually wrote code in my RHEL SAS9.4M7 environment like below things didn't work for me calling this %include statement within my macro.

%include codegen / source2 s2=2048; 

It did work in my mock-up code where I just generated a long line of code and then %included it.

 

I'll close this question given that things work for me even though I'm still a bit at a loss in regards of understanding.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 2 replies
  • 481 views
  • 2 likes
  • 2 in conversation