Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Issue accessing Global Temporary Table

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
jaggi

New User


Joined: 05 Jul 2007
Posts: 3
Location: India

PostPosted: Fri Jul 06, 2007 2:25 pm    Post subject: Issue accessing Global Temporary Table
Reply with quote

Hi,

I have some issues accessing a Global Temporary Table created inside a COBOL-DB2 stored procedure.
The stored procedure inserts rows in this temporary table and a COBOL-CICS program accesses a cursor opened on temporary table. The issue here is --> there are 2 logical branches in Stored Procedure and for branch 1 rows are being inserted into temporary table and also being accessed properly by COBOL-CICS program. But for branch 2 --> rows are being inserted into temporary table but when COBOL-CICS program tries to access those rows it is getting SQLCODE of +100(record not found/end of cursor).
The only difference in processing done in branch 1 & 2 is that, in branch 1 couple of batch programs(Online loads of COBOL program) are being called and in branch 2 couple of online programs(Online COBOL) are being called through this stored procedure.

Initially I though the issue might have been because of some commit/syncpoint happening in called programs, so I have declared the Temporary Table with 'ON COMMIT PRESERVE ROWS'.

Can somebody suggest any possible reason for this.

Thanks.
Back to top
View user's profile Send private message

sandeep1dimri

New User


Joined: 30 Oct 2006
Posts: 76

PostPosted: Fri Jul 06, 2007 2:50 pm    Post subject:
Reply with quote

Hope it will help

The DECLARE GLOBAL TEMPORARY TABLE statement defines a temporary table for the current connection. These tables do not reside in the system catalogs and are not persistent. Temporary tables exist only during the connection that declared them and cannot be referenced outside of that connection. When the connection closes, the rows of the table are deleted, and the in-memory description of the temporary table is dropped.

Sandeep
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts Accessing CICS tran with map from JCL... navdeepaggarwal CICS 5 Tue Oct 03, 2017 6:15 pm
No new posts Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us