Good morning all,
I'm not convinced this is my issue but I'm going to start here. I'm creating a list of variables with PROC SQL:
PROC SQL NOPRINT ;
SELECT ESIID FORMAT = $22. INTO :METER SEPARATED BY ' '
FROM MINING_ESIIDS;
QUIT;
There's 117 observations all of which are the same length except one, the 110th OBS, it's LENGTH 22. I have a macro that calls each :METER variable and does a MERGE and some calculations. However, as soon as it hits the :METER with the odd length I get the following error:
ERROR: Overflow has occurred; evaluation is terminated.
ERROR: The condition in the %DO %UNTIL loop, &_METER=, yielded an invalid or missing value, .
The macro will stop executing.
ERROR: The macro ESIID will stop executing.
Here's the macro code:
%MACRO ESIID;
%GLOBAL _METER;
%LET I = 1;
%LET _METER = %SCAN(&METER, &I);
%DO %UNTIL (&_METER=);
DATA _NULL_;
METER_STR = "&_METER";
CALL SYMPUTX('METER_STR',"'"||METER_STR||"'");
PUT METER_STR;
RUN;
DATA ESIIDR_&_METER (KEEP = DATE1 INTERVAL ESIID2 MWH MN_COGS);
SET INTERVAL_DATA_2;
WHERE ESIID2 = &METER_STR;
MERGE AUXCTS;
IF ZONE = 'Houston' THEN MN_COGS = MWH * LZ_HOUSTON;
IF ZONE = 'North' THEN MN_COGS = MWH * LZ_NORTH;
IF ZONE = 'South' THEN MN_COGS = MWH * LZ_SOUTH;
IF ZONE = 'West' THEN MN_COGS = MWH * LZ_WEST;
RUN;
%LET I = %EVAL(&I+1);
%LET _METER = %SCAN(&METER, &I);
%END;
%MEND;
%ESIID;
When I exclude the odd meter from the table the macro finishes with no errors. I've read where I may need a Hotfix for this, but I'm reluctant to install it without trying to debug it. Any help would be appreciated!
... View more