View previous topic :: View next topic
|
Author |
Message |
rakesh17684
New User
Joined: 08 Oct 2006 Posts: 61 Location: San Diego
|
|
|
|
Hi,
We have requirement in which we got to unload a table into a file,sort it and load it back to another table. We have 4 columns that are nulllable along with others in the table ,
There are the nullable clumn
Code: |
accountno DECIMAL(17,0)
date DATE
item no DECIMAL(10,0)
name CHAR(15) |
we are unloading this to cobol variable . for one of the fields its like
Code: |
ws-accountno PIC S9(17) COMP-3.
ws-accountno-n PIC S9(4) COMP.
|
and moving this to a same set of host varibales with same datatype which is causing SOC7..
Can you know where i am going wrong in this move??
Thanks in advance |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Suggest you make sure you actually have a value before you try to use it.
If a column is set as being null, you cannot move the data value as none exists. |
|
Back to top |
|
|
Bharath Bhat
Active User
Joined: 20 Mar 2008 Posts: 283 Location: chennai
|
|
|
|
Please make sure of two things,
1) The position of the null indicator. (When we unload data from DB2, I think we'll get the null indicator prior to the data.)
2) Check the null indicator = 0 before moving the data field. If its not 0, then do not move the null value. That would give S0C7.
Hope this helps. |
|
Back to top |
|
|
rakesh17684
New User
Joined: 08 Oct 2006 Posts: 61 Location: San Diego
|
|
|
|
Thanks, I did exactly what bharth had said and it worked. The null indicator were present prior to the data and i did check like, null indicator = FF and i resolved the SOC7. Many thx to all for the help |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Good to hear it is working - thank you for letting us know
d |
|
Back to top |
|
|
|