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
 

 

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 Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm
No new posts unload data from table with lob columns farhad_evan DB2 1 Sat Apr 22, 2017 1:32 pm
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm
No new posts Join of more than one table dibyendumandal11111 DB2 6 Mon Feb 13, 2017 11:36 pm


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