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

Not reaching End-of-Table.


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

Moderator Emeritus


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

PostPosted: Sat Jul 07, 2007 3:29 am
Reply with quote

So long as the copybook at their location hasn't been "customized" - not likely, i suppose, but possible. . .

For COBOL, (from the same manual) the "standard" is
Code:
COBOL:

     01 SQLCA.
        05 SQLCAID      PIC X(8).
        05 SQLCABC      PIC S9(9) COMP-4.
        05 SQLCODE      PIC S9(9) COMP-4.
        05 SQLERRM.
           49 SQLERRML  PIC S9(4) COMP-4.
           49 SQLERRMC  PIC X(70).
        05 SQLERRP      PIC X(8).
        05 SQLERRD      OCCURS 6 TIMES
                        PIC S9(9) COMP-4.
        05 SQLWARN.
           10 SQLWARN0  PIC X.
           10 SQLWARN1  PIC X.
           10 SQLWARN2  PIC X.
           10 SQLWARN3  PIC X.
           10 SQLWARN4  PIC X.
           10 SQLWARN5  PIC X.
           10 SQLWARN6  PIC X.
           10 SQLWARN7  PIC X.
        05 SQLEXT.
           10 SQLWARN8  PIC X.
           10 SQLWARN9  PIC X.
           10 SQLWARNA  PIC X.
           10 SQLSTATE  PIC X(5).
Back to top
View user's profile Send private message
catchyblues

New User


Joined: 28 Dec 2005
Posts: 24

PostPosted: Mon Jul 09, 2007 10:28 pm
Reply with quote

Atlast !!!! i could fix this......


Actually it was the View which i was using created the problem..... The column attributes in the View were created without the Not NULL option and hence the view had lot of NULL rows. So the Fetch was showing the last record which was in the Host variables.

Got over with this problem by checking for the value in the null indicator after the Fetch and exiting the Fetch process when the value is -1(null row) in the null indicator.....

thnx a lot for ur help Scherrer.......


Cheers
CB
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 Jul 09, 2007 11:18 pm
Reply with quote

You're welcome icon_smile.gif

Good to hear that it is resolved.
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 Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
No new posts Dynamically pass table name to a sele... DB2 2
Search our Forums:

Back to Top