View previous topic :: View next topic |
Author |
Message |
arshadh Beginner
Joined: 10 Jan 2007 Posts: 33 Topics: 12
|
Posted: Tue May 22, 2007 7:48 am Post subject: DB2 Stored Procedure - NULL Indicator issue. |
|
|
My DBA has defined a stored procedure with NULL-Indicator as SMALLINT.
In the Underlying COBOL-SQL Stored procedure we have defined that as S9(04) COMP. It will be invoked by the JAVA front end.
The Problem is Eventhough we move some numeric values (say -1,5 etc.) in the NULL indicaor fields it gives only ZERO in the output(front end).
So for debugging purpose we added Display statements to Display the value of the NULL indicators after moving -1 into the same We got (in the Corressponding DB2 job Spool)
Code: | ENT-CODE-NULLIND 0000J
PROD-CD-NULLIND 0000J
WAR-NAME-NULLIND 0000J
WAR-MESG-NULLIND 0000J . |
Also the other thing to be noted here is S9(4) comp displays 5 bytes. Please clarify what cud be the problem... |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
arshadh Beginner
Joined: 10 Jan 2007 Posts: 33 Topics: 12
|
Posted: Tue May 22, 2007 9:41 pm Post subject: |
|
|
But the front end Java program shows the NULL inicator value as zero '0'. I think it considers only the first four bytes... Help me to resolve the issue |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Tue May 22, 2007 9:48 pm Post subject: |
|
|
arshadh,
Move the null ind defined as S9(04) COMP to a variable defined as -9(3) and read this variable in java.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
arshadh Beginner
Joined: 10 Jan 2007 Posts: 33 Topics: 12
|
Posted: Wed Jul 11, 2007 11:47 pm Post subject: |
|
|
Dear All,
The Problem was with myself. I declared all the linkage section variables under one 01 level. But my seniors told me to decalre them as indivdual 01 level variables.. Then the problem was solved and the right values to and fro the Stored procedure.
Thanks a lot kolusu.. |
|
Back to top |
|
|
|
|