BookmarkSubscribeRSS Feed
vinodkurra
Calcite | Level 5
Hi
when i typed this program i am getting open code statement recursion error , how can i resolve this error

%LET First=SAS;
%LET Second=Program;
%LET both=&First&Second;
%PUT The results are: &First,&Second,---&both.ming;
3 REPLIES 3
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Your SAS code snippet works with my SAS system -- possibly you have not shared additional info about other SAS code that may have been executed previously, in the same SAS session?

Scott Barry
SBBWorks, Inc.



NOTE: SAS initialization used:
real time 2.08 seconds
cpu time 1.12 seconds

1 options mlogic mprint;
2 %LET First=SAS;
3 %LET Second=Program;
4 %LET both=&First&Second;
5 %PUT The results are: &First,&Second,---&both.ming;
The results are: SAS,Program,---SASProgramming
piggy
Fluorite | Level 6
it works fine for me.

75 %LET First=SAS;
76 %LET Second=Program;
77 %LET both=&First&Second;
78 %PUT The results are: &First,&Second,---&both.ming;
The results are: SAS,Program,---SASProgramming
PatrickG
SAS Employee
Works for me, too. Scott is probably right. Try it again in a new SAS session.

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
  • 3 replies
  • 1122 views
  • 0 likes
  • 4 in conversation