View previous topic :: View next topic
|
Author |
Message |
David Robinson
Active User
Joined: 21 Dec 2011 Posts: 199 Location: UK
|
|
|
|
I am running ISPF in batch to create multipe tables in a PDS. It works fine, but I notice that it closes the dataset after each TBCLOSE statement and then has to re-open it for the next one. When this is running in production it will be creating around 20,000 tables so I want the dataset to be opened once at the start and then closed at the end.
TBCLOSE documentation specifically states that "Issuing a TBCLOSE with the LIBRARY parameter for a table is not related to closing the data set allocated to that ddname". But that doesn't seem to be the case.
Any ideas? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
You will have to live with that
that' s the way ispf table processing works. |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
David Robinson wrote: |
I am running ISPF in batch to create multipe tables in a PDS. It works fine, but I notice that it closes the dataset after each TBCLOSE statement and then has to re-open it for the next one. When this is running in production it will be creating around 20,000 tables so I want the dataset to be opened once at the start and then closed at the end. |
Did anyone actually had some thoughts about an application that uses 20,000 tables... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Sounds like someone had a "solution" and looked about for somewhere to apply the "solution".
How did a 20,000 table alternative even get considered?
If we knew what was being done, we might have alternatives to offer. |
|
Back to top |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 765 Location: Whitby, ON, Canada
|
|
|
|
Have you considered using TBSAVE rather than TBCLOSE? I have not tried it myself, but I suspect that TBSAVE will not close the data set. However, TBSAVE will not close the table, so you might end up with 20,000 open tables at the end of the job. You could try issuing TBEND after TBSAVE, but that may close the data set too. |
|
Back to top |
|
|
David Robinson
Active User
Joined: 21 Dec 2011 Posts: 199 Location: UK
|
|
|
|
Thanks Enrico, at least I wont waste any more time trying to stop it doing what it is supposed to do! I guess the reference in the manual about not closing the dataset must refer to a different scenario.
And thanks everyone else for your input, I think it is time we thought about a fundamental redesign! |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Are these tables to be rebuilt for each execution? Will they always be the same?
If the answer to both is yes, you might consider running the table-build process one time and create a new library. Then copy all of these members to the actual tables in the normal run via utility before the actual process begins.
This may help while a redesign is researched. |
|
Back to top |
|
|
|