IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Getting SOC7 when Unloading Nullable columns from DB2 table


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rakesh17684

New User


Joined: 08 Oct 2006
Posts: 61
Location: San Diego

PostPosted: Mon Feb 02, 2009 11:45 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Feb 02, 2009 12:45 pm
Reply with quote

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
View user's profile Send private message
Bharath Bhat

Active User


Joined: 20 Mar 2008
Posts: 283
Location: chennai

PostPosted: Mon Feb 02, 2009 5:44 pm
Reply with quote

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
View user's profile Send private message
rakesh17684

New User


Joined: 08 Oct 2006
Posts: 61
Location: San Diego

PostPosted: Tue Feb 03, 2009 9:42 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Feb 03, 2009 9:52 am
Reply with quote

Good to hear it is working - thank you for letting us know icon_smile.gif

d
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Remote Unload of CLOB Columns DB2 6
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
Search our Forums:

Back to Top