Desktop productivity for business analysts and programmers

ERROR: Macro keyword LET appears as text.

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

ERROR: Macro keyword LET appears as text.

Hi everyone!

 

I'm having trouble with some SAS programs - it's strange that I can run some programs within one Projetct, but I can't run others..

 

I tried even executing a blank code. I get the following errors:

 

1 ;*';*";*/;quit;run;

2 OPTIONS PAGENO=MIN;

3 %LET _CLIENTTASKLABEL='Program';

ERROR: Macro keyword LET appears as text.

4 %LET _CLIENTPROCESSFLOWNAME='Process Flow';

ERROR: Macro keyword LET appears as text.

5 %LET _CLIENTPROJECTPATH='';

ERROR: Macro keyword LET appears as text.

6 %LET _CLIENTPROJECTPATHHOST='';

ERROR: Macro keyword LET appears as text.

7 %LET _CLIENTPROJECTNAME='';

ERROR: Macro keyword LET appears as text.

8 %LET _SASPROGRAMFILE='';

ERROR: Macro keyword LET appears as text.

9 %LET _SASPROGRAMFILEHOST='';

ERROR: Macro keyword LET appears as text.

 

Can someone help me on this one?  Does it have to do with the program's OPTIONS?

 

Thanks a lot in advance!


Accepted Solutions
Solution
‎06-18-2018 10:08 AM
SAS Employee
Posts: 19

Re: ERROR: Macro keyword LET appears as text.

Posted in reply to nicolasbaviano

Errors such as yours occur if you submitted macro code in Enterprise Guide that contains a missing semi-colon or missing parenthesis. Once this occurs, the Eguide session is not able to recover.  You can try placing the following string at the very top of your code to try and recover from the error.

 

;*%mend;*);*';*";**/;

run;

 

If this does not resolve the error, you will have to restart your EG session and fix your macro code before submitting it again.

View solution in original post


All Replies
Solution
‎06-18-2018 10:08 AM
SAS Employee
Posts: 19

Re: ERROR: Macro keyword LET appears as text.

Posted in reply to nicolasbaviano

Errors such as yours occur if you submitted macro code in Enterprise Guide that contains a missing semi-colon or missing parenthesis. Once this occurs, the Eguide session is not able to recover.  You can try placing the following string at the very top of your code to try and recover from the error.

 

;*%mend;*);*';*";**/;

run;

 

If this does not resolve the error, you will have to restart your EG session and fix your macro code before submitting it again.

Super User
Super User
Posts: 9,840

Re: ERROR: Macro keyword LET appears as text.

Posted in reply to nicolasbaviano

Nope, not to do with options.  You have an error in your code somewhere, unbalanced quotes or unfinished blocks.  This: ;*';*";*/;quit;run;

Is a kind of catch all but doesn't always work.  You need to first identify when the error starts occurring, e.g. run each project in a fresh SAS session, the reason for the fresh session is that unbalanced quotes and such like hang over for the next run.  I.e. if one program breaks the compiler, then all programs until the problem is fixed will fail.  Starting a new session clears all that.  As for helping debug, you will need to find out where it starts, run them all, find the first occurrence, then look at the code from that point backwards.

New Contributor
Posts: 2

Re: ERROR: Macro keyword LET appears as text.

Thanks! Indeed, after restarting the session it worked.
PROC Star
Posts: 1,334

Re: ERROR: Macro keyword LET appears as text.

Posted in reply to nicolasbaviano

Another option is to disconnect from your SAS session and then connect to a new one. That will get rid of any of these issues that SAS is "holding on" to.

 

Tom

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 179 views
  • 0 likes
  • 4 in conversation