View previous topic :: View next topic
|
Author |
Message |
Rsriram1982
New User
Joined: 08 May 2010 Posts: 3 Location: Chennai
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
Back to top |
|
|
Rsriram1982
New User
Joined: 08 May 2010 Posts: 3 Location: Chennai
|
|
|
|
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 |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
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 |
|
|
Rsriram1982
New User
Joined: 08 May 2010 Posts: 3 Location: Chennai
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Good to hear it is working - thank you for letting us know
d |
|
Back to top |
|
|
|