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: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1152 views
  • 0 likes
  • 4 in conversation