The sql is as follows:
EXEC SQL
SELECT NRO_DOCU,
CUENTA_DOCU,
BANCO_DOCU,
SUC_DOCU,
C_POST_DOCU,
IMPORTE_DOCU,
CHEQ_NRO_CUENTA,
INTO
:COEL12, (PIC S9(9) COMP.)
:COEL16, (PIC S9(17) COMP-3.)
:COEL13, (PIC S9(4) COMP.)
:COEL14, (PIC S9(4) COMP.)
:COEL15, (PIC S9(6) COMP-3.)
:COEL17, (PIC S9(9)V99 COMP-3.)
:CHEQ-NRO-CUENTA, PIC S9(16) USAGE COMP-3.)
FROM TABLE1, TABLE2
WHERE CHEQ_NRO_CHEQUE = :COEL12
AND CHEQ_BCO_EMIS = :COEL13
AND CHEQ_SUC_EMIS = :COEL14
AND CHEQ_COD_POSTAL = :COEL15
AND FECHA = :WS-TODAY
END-EXEC.
SELECT NRO_DOCU,
CUENTA_DOCU,
BANCO_DOCU,
SUC_DOCU,
C_POST_DOCU,
IMPORTE_DOCU,
CHEQ_NRO_CUENTA,
INTO
:COEL12, (PIC S9(9) COMP.)
:COEL16, (PIC S9(17) COMP-3.)
:COEL13, (PIC S9(4) COMP.)
:COEL14, (PIC S9(4) COMP.)
:COEL15, (PIC S9(6) COMP-3.)
:COEL17, (PIC S9(9)V99 COMP-3.)
:CHEQ-NRO-CUENTA, PIC S9(16) USAGE COMP-3.)
FROM TABLE1, TABLE2
WHERE CHEQ_NRO_CHEQUE = :COEL12
AND CHEQ_BCO_EMIS = :COEL13
AND CHEQ_SUC_EMIS = :COEL14
AND CHEQ_COD_POSTAL = :COEL15
AND FECHA = :WS-TODAY
END-EXEC.
and I'm getting error:
SQLCODE: 000310-
DECIMAL HOST VARIABLE OR PARAMETER CONTAINS NON DECIMAL DATA.
DECIMAL HOST VARIABLE OR PARAMETER CONTAINS NON DECIMAL DATA.
I guess something's going on with the "into" part of the select. something related to reg IMPORTE_DOCU (PIC S9(9)V99 COMP-3) but i'm lost trying to solve it.
Can someone help me out please.
All variables are declared or belong to a copy.
Thanks.
edited by moderator