DATA Step, Macro, Functions and more

what is the error in MACROS and How to resolve

Reply
N/A
Posts: 1

what is the error in MACROS and How to resolve

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;
Super Contributor
Super Contributor
Posts: 3,174

Re: what is the error in MACROS and How to resolve

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
Occasional Contributor
Posts: 14

Re: what is the error in MACROS and How to resolve

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
SAS Employee
Posts: 58

Re: what is the error in MACROS and How to resolve

Works for me, too. Scott is probably right. Try it again in a new SAS session.
Ask a Question
Discussion stats
  • 3 replies
  • 201 views
  • 0 likes
  • 4 in conversation