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
 
How to switch plans within a batch cobol program

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

New User


Joined: 05 Oct 2006
Posts: 1

PostPosted: Wed Dec 09, 2009 5:20 am    Post subject: How to switch plans within a batch cobol program
Reply with quote

I have a set of tables grouped by owner. Our bind procedure creates a plan for each group of tables by owner. So if I want to process group A, I execute the cobol program using the plan for group A. If I want to process the group B tables I execute the same cobol program using the plan for group B.

How can I dynamically select which plan to use in the cobol program so the program can decide which plan to use during the execution of the program and possibly switch between plans during the same execution of the program?
Back to top
View user's profile Send private message

sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Wed Dec 09, 2009 11:34 am    Post subject:
Reply with quote

Hi Gjdeluca,

Dynamically changing a plan inside a program, i dont know or i never seen somebody do it.

Quote:
Our bind procedure creates a plan for each group of tables by owner.

You can bind to different set of collections and these collection has to be in the same plan. Like one collection is called COLGRPA and the other one is called COLGRPB and these have to be bound to a plan PLNGRPS.

Quote:
If I want to process the group B tables I execute the same cobol program using the plan for group B

In your COBOL program, use
Code:
SET CURRENT PACKAGESET = :collection-name

to switch collection.

And ofcourse, you have to change the qualifier of both packages.

Thank You,
Sushanth
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 How to display offset thru cobol prog... tvinodkumar7 CICS 1 Sun Apr 22, 2018 8:42 pm
No new posts Linkage editor is part of COBOL, z/OS... ankit.jain COBOL Programming 4 Fri Apr 20, 2018 4:17 pm
This topic is locked: you cannot edit posts or make replies. Difference between EQUAL and EQUAL TO... jithinraghavan COBOL Programming 3 Thu Apr 19, 2018 2:22 am
No new posts How do you attach a DB2 plan to a CIC... John Poulakos DB2 0 Wed Apr 18, 2018 1:49 am
No new posts Call COBOL or PLI with a click from w... vaibhav gs All Other Mainframe Topics 1 Mon Apr 16, 2018 7:29 pm

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