Hi,
I created the following fex and it works great:
MATCH FILE FCT_DLY_ITM_SLS
BY CUST_KEY
RUN
FILE DIM_CUST
BY CUST_KEY
AFTER MATCH HOLD AS CUSTHOLD OLD-NOT-NEW
END
-*
-SET &CUSTIND = IF &LINES EQ 0 THEN 0 ELSE 1;
-*
DEFINE FILE DIM_FOB
CUST_MESSAGE/A65 WITH FOB_CORP_NM = 'No CUST_KEY in FCT without CUST_KEY in DIM_CUST';
CUST_IMAGE/A65 = IF &CUSTIND EQ 0 THEN '
' ELSE '
';
END
-*
TABLE FILE DIM_FOB
PRINT
CUST_MESSAGE AS ''
CUST_IMAGE AS ''
WHERE RECORDLIMIT EQ 1
END
However, if I change the code to the following so I can print the records in the hold file instead, I get an error (see error below):
MATCH FILE FCT_DLY_ITM_SLS
BY CUST_KEY
RUN
FILE DIM_CUST
BY CUST_KEY
AFTER MATCH HOLD AS CUSTHOLD OLD-NOT-NEW
END
-*
TABLE FILE CUSTHOLD
PRINT *
END
Error:
(FOC1400) SQLCODE IS -99999 (HEX: FFFE7961)
: [01S01] [IBM][CLI Driver] CLI0165E Error in row. SQLSTATE=01S01 [22003]
: [IBM][CLI Driver][DB2] SQL0802N Arithmetic overflow or other arithmeti
: c exception occurred. SQLSTATE=22003
(FOC1407) SQL FETCH CURSOR ERROR. : FCT_DLY_ITM_SLS
BYPASSING TO END OF COMMAND
(FOC205) THE DESCRIPTION CANNOT BE FOUND FOR FILE NAMED: CUSTHOLD
BYPASSING TO END OF COMMAND
Does anyone know why this is happening? Also, I tried using a JOIN instead of MATCH and the same thing is happening.
Thanks!
Krysti
WF 767