IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search Log in to check your private messages Log in
 

Create multiple tables without closing the dataset


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
David Robinson

Active User


Joined: 21 Dec 2011
Posts: 197
Location: UK

PostPosted: Tue Nov 19, 2013 5:22 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Senior Member


Joined: 14 Mar 2007
Posts: 10697
Location: italy

PostPosted: Tue Nov 19, 2013 5:37 pm
Reply with quote

You will have to live with that icon_cool.gif
that' s the way ispf table processing works.
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1226
Location: Vilnius, Lithuania

PostPosted: Tue Nov 19, 2013 5:43 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19251
Location: Inside the Matrix

PostPosted: Tue Nov 19, 2013 7:34 pm
Reply with quote

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
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 692
Location: Whitby, ON, Canada

PostPosted: Tue Nov 19, 2013 8:14 pm
Reply with quote

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
View user's profile Send private message
David Robinson

Active User


Joined: 21 Dec 2011
Posts: 197
Location: UK

PostPosted: Wed Nov 20, 2013 12:58 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19251
Location: Inside the Matrix

PostPosted: Wed Nov 20, 2013 7:37 pm
Reply with quote

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
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 -> TSO/ISPF

 

Search our Forum:

Similar Topics
Topic Forum Replies
No new posts Creating a single-record file with CO... DFSORT/ICETOOL 8
No new posts Read 4MB message and split into multi... COBOL Programming 9
No new posts insert into session tables with UR DB2 0
No new posts Sync logic between VSAM files and DB2... COBOL Programming 9
No new posts Multiple Sums in one File SYNCSORT 2

Back to Top