I have an query in my application program like below,
EXEC SQL
SELECT CENTR_NAME_X,
CENTR_TYPE_C,
HMLN_RGION_N
INTO :CENTR-NAME-X,
:CENTR-TYPE-C,
:HMLN-RGION-N
FROM HMLN.ONLIN_CENTR
WHERE CENTR_IBT_N = :DCLHMLN-RGSTN.RGION-IBT-N
WITH UR
END-EXEC.
SELECT CENTR_NAME_X,
CENTR_TYPE_C,
HMLN_RGION_N
INTO :CENTR-NAME-X,
:CENTR-TYPE-C,
:HMLN-RGION-N
FROM HMLN.ONLIN_CENTR
WHERE CENTR_IBT_N = :DCLHMLN-RGSTN.RGION-IBT-N
WITH UR
END-EXEC.
both CENTR_IBT_N and DCLHMLN-RGSTN.RGION-IBT-N declared as decimal (5,0) not null. The actual value of DCLHMLN-RGSTN.RGION-IBT-N is 00000.
While the program was executing, i have got an ABEND with SQLCODE is -31} (-310). Which is DECIMAL HOST VARIABLE OR PARAMETER number CONTAINS NON-DECIMAL DATA. I was puzzled here because while i execute the same query in spufi like below
SELECT CENTR_NAME_X,
CENTR_TYPE_C,
HMLN_RGION_N FROM HMLN.ONLIN_CENTR
WHERE CENTR_IBT_N = 00000;
CENTR_TYPE_C,
HMLN_RGION_N FROM HMLN.ONLIN_CENTR
WHERE CENTR_IBT_N = 00000;
Someone please help out on this.?