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
 
Global Temporary table

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

New User


Joined: 08 May 2010
Posts: 3
Location: Chennai

PostPosted: Sat May 08, 2010 10:52 am    Post subject: Global Temporary table
Reply with quote

Hi,

I am using a Global temporary table which is being created/dropped in the COBOL sub-program itself.

This sub-program is getting called for more than 12,000 times in one scenario. However, after 11758 times, the sub-program is getting abended with a sqlcode as -904.

Is there any limitations with number of times a Global temp tables (or session table) to be created and/or dropped in one execution of the main program? If so, is there a way to increase this limit or can any one of you give me an option to solve this issue?

Thanks!!!
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: Sat May 08, 2010 10:59 am    Post subject:
Reply with quote

Hello and welcome to the forum,

Which resource is not available? What is the reason code?

How many rows are insereted into this temporary table each time thru?

You might look here:
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/handheld/Connected/BOOKS/dsnsqk10/5.129
Back to top
View user's profile Send private message
Rsriram1982

New User


Joined: 08 May 2010
Posts: 3
Location: Chennai

PostPosted: Sat May 08, 2010 11:04 am    Post subject: Reply to: Global Temporary table
Reply with quote

Hi, I am sorry. It was a typo in my 1st msg. I got a -204 sqlerror, which looks to be like the temporary table is not getting declared.

We executed the program multiple times and the insertion into the temporary table varies, but the number of times the sub-program being called remained at 11758.

1st time inserted around 35k times into the temp table.
2nd time inserted around 25k times into the temp table.

Thanks!!
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Sat May 08, 2010 5:46 pm    Post subject:
Reply with quote

Rsriram,

Can you show us your code, especially the declaration of DGTT.
We also like to know the reason code for the error.

Are you doing any commits while inserting into the table.

Sushanth
Back to top
View user's profile Send private message
Rsriram1982

New User


Joined: 08 May 2010
Posts: 3
Location: Chennai

PostPosted: Sun May 09, 2010 9:55 am    Post subject: Reply to: Global Temporary table
Reply with quote

Hi All,

We have found a solution for this problem. Instead of creating and dropping the temporary table everytime the sub program is called, we modified in such a way that the table will be created & dropped only once (for any number of sub-programs). Now the program is running fine for even 37000 records.


Thanks for showing interest on this forum!
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: Sun May 09, 2010 10:00 am    Post subject: Reply to: Global Temporary table
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 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 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
No new posts PC (UTF-8) -> z/OS (EBCDIC) -> ... prino All Other Mainframe Topics 4 Fri Sep 01, 2017 1:47 am

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