BookmarkSubscribeRSS Feed
saikiran_nemani
Obsidian | Level 7
%end;
);
%end;

/* Macro jumps here if it has already been run with these parameters. */

%The_End:
%if &rflag=YES %then
%do;
NOTE: Remote submit to SASSRVP complete.
MLOGIC(RSUBMIT):  Ending execution.
ERROR: The %END statement is not valid in open code.

MPRINT(GRAB_INSTALL_DATA):   proc sql;
SYMBOLGEN:  Macro variable INCLUDE_XICMS resolves to Y
MLOGIC(GRAB_INSTALL_DATA):  %IF condition &include_xicms.=N is FALSE
SYMBOLGEN:  Macro variable ST_DAT resolves to &be_date.
WARNING: Apparent symbolic reference BE_DATE not resolved.
WARNING: Apparent symbolic reference BE_DATE not resolved.
ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric
       operand is required. The condition was: &be_date.
SYMBOLGEN:  Macro variable END_DAT resolves to &en_date.
WARNING: Apparent symbolic reference EN_DATE not resolved.
WARNING: Apparent symbolic reference EN_DATE not resolved.
ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric
       operand is required. The condition was: &en_date.
MLOGIC(GRAB_INSTALL_DATA):  %IF condition %sysevalf(&st_dat) <
      %sysfunc(intnx(Month,%sysfunc(today()),0)) and   %sysevalf(&end_dat) >=
      %sysevalf('01jan2008'd) is FALSE
ERROR: The macro GRAB_INSTALL_DATA will stop executing.
MPRINT(GRAB_INSTALL_DATA):   create table allfails as select * from
staging.ads_daily_failed_installs where scheduled_date ge intnx('month',today(),0) and SITEID
ne 34 and type in ('A','D','T','H','V','U','F','4','#','-','2')
MLOGIC(GRAB_INSTALL_DATA):  Ending execution.
2 REPLIES 2
PaigeMiller
Diamond | Level 26

 

%The_End:
%if &rflag=YES %then
%do;
NOTE: Remote submit to SASSRVP complete.
MLOGIC(RSUBMIT):  Ending execution.
ERROR: The %END statement is not valid in open code.

 

This error happens because you are using %IF %THEN %DO outside of a macro. You can't do that (unless your have SAS 9.4TS1M5 or later, which obviously you don't).

 

 

SYMBOLGEN:  Macro variable ST_DAT resolves to &be_date.

 

WARNING: Apparent symbolic reference BE_DATE not resolved.

You macro variable ST_DAT is replaced by the text &be_date, a macro variable which does not have a value, so your SAS program does not know how to continue.

--
Paige Miller
Tom
Super User Tom
Super User

Looks like you are using SAS/Connect to remote submit some code to another SAS session?

Looks like your program has gotten confused about what code is being sent to which session and so you have gotten code like %GOTO and %DO/%END that can only work inside of a macro definition pushed into open code.

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 788 views
  • 0 likes
  • 3 in conversation