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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

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
  • 922 views
  • 0 likes
  • 4 in conversation