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

Issue accessing Global Temporary Table


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
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
Search our Forums:

Back to Top