View previous topic :: View next topic |
Author |
Message |
sant_1028 Beginner
Joined: 23 Dec 2004 Posts: 8 Topics: 4
|
Posted: Thu Dec 23, 2004 1:11 pm Post subject: Handling Null Indicators for cobol stored proc |
|
|
We have written a cobol db2 stored proc program with Generate with Nulls option. We are calling this stored proc from db2 command center.
From the stored proc we are getting one amount field (decimal) and date field as null values. How to handle this null values in the cobol program. Our stored proc abends whenever we get null values. We do insert and update in this program. In the databse those fields are delcared as nullable.
Declared this in Linkage section
01 IND-PARM.
05 IN-AMT-IND PIC S9(4) COMP.
05 IN-DT-IND PIC x(26).
01 INPUT-VAR.
05 IN-AMT PIC S9(4) COMP.
05 IN-DT PIC x(26).
PROCEDURE DIVISION USING IN-AMT,
IN-DT.
EXEC SQL
INSERT
INTO X
(amt, dt) values :IN-AMT
IN-AMTAST-IND
, IN-DT
IN-DT-IND
END-EXEC
Do we need to give IND-PARM in procedure devison using variabl?
Do we need todo anything? Please advise.
Thanks in advance. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
|
|