Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Getting SOC7 when Unloading Nullable columns from DB2 table

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
rakesh17684

New User


Joined: 08 Oct 2006
Posts: 59
Location: Atlanta

PostPosted: Mon Feb 02, 2009 11:45 am    Post subject: Getting SOC7 when Unloading Nullable columns from DB2 table
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

Site Director


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

PostPosted: Mon Feb 02, 2009 12:45 pm    Post subject:
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    Post subject:
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: 59
Location: Atlanta

PostPosted: Tue Feb 03, 2009 9:42 am    Post subject: Thanks it worked!!!
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

Site Director


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

PostPosted: Tue Feb 03, 2009 9:52 am    Post subject: Reply to: Getting SOC7 when Unloading Nullable columns from
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm
No new posts Command UNIQUE CONSTRAINT on any tabl... rohanthengal DB2 2 Thu Aug 18, 2016 3:48 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us