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
 

 

Executing program which have different plans

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

New User


Joined: 24 Mar 2010
Posts: 12
Location: Bangalore

PostPosted: Tue Mar 30, 2010 3:20 pm    Post subject: Executing program which have different plans
Reply with quote

Hi,

I have two programs PGM-A and PGM-B. PGM-A is bound to PLAN-A and PGM-B is bound to PLAN-B.

PGM-A calls PGM-B. How do i execute PGM-A without binding the programs to a single plan?

Thanks
Back to top
View user's profile Send private message

daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 645
Location: Pennsylvania

PostPosted: Tue Mar 30, 2010 7:21 pm    Post subject:
Reply with quote

A package is not bound to a Plan. A package is bound into a collection.

When a Plan is bound it contains a package list in the format similar to:
collection_id.package_name or
collection_id.* (where any package in the collection is valid)
There are several variations allowed (see the manual)

Anyway, in order to answer your question, you must answer these questions.
We have been down this road with so many posters, so please do not skip any answers.

What does the Bind statement look like you use to bind your packages (both a and b)?

What does the Bind statement look like you use to bind your plans (both a and b)?

What does you systsin cards look like to execute your programs?
Back to top
View user's profile Send private message
Abijoy

New User


Joined: 24 Mar 2010
Posts: 12
Location: Bangalore

PostPosted: Wed Mar 31, 2010 4:41 pm    Post subject: Reply to: Executing program which have different plans
Reply with quote

Hi Dave,

Thanks for attempting to answer this. Please find the answers to the questions below.

What does the Bind statement look like you use to bind your packages (both a and b)?

PGMA
Code:

DSN SYSTEM(DB2X)  BIND PACKAGE(TEST)       ACTION(REP)       CURRENTDATA(NO) DYNAMICRULES(BIND)       EXPLAIN(YES)       ISOLATION(CS) MEMBER([b]PGMA[/b])       OWNER(SYDB2FT)       PATH("SYSIBM","SYSFUN","SYSPROC") QUALIFIER(SYDB2FT)       RELEASE(COMMIT)


PGMB - no package

What does the Bind statement look like you use to bind your plans (both a and b)?

PGMA - no BIND PLAN

PGMB -
Code:

DSN SYSTEM(DB2X) -
BIND PLAN(DB2PPGMB) -
  MEMBER(DSN9BC80) -
  ACTION(ADD) -
  ISOLATION(CS) -
  OWNER(DB2FT) -
  QUALIFIER(PROD) -


What does you systsin cards look like to execute your programs?
These are the cards use to run them separately.

Code:

DSN SYSTEM(DB2X)
RUN  PROGRAM(PGMA) PLAN(DBPL0001)


Code:

DSN SYSTEM(DB2X)
RUN  PROGRAM(PGMB) PLAN(DB2PPGMB)
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 645
Location: Pennsylvania

PostPosted: Wed Mar 31, 2010 6:58 pm    Post subject:
Reply with quote

Hi Abijoy,

Thanks for answering all of the questions.

There is however some inconsistencies in your statements.

First off:
Quote:

PGM-A is bound to PLAN-A and PGM-B is bound to PLAN-B


But then you say
Quote:

PGMA - no BIND PLAN


And you say
Quote:

PGMB - no package

DSN SYSTEM(DB2X) -
BIND PLAN(DB2PPGMB) -
MEMBER(DSN9BC80) -
ACTION(ADD) -
ISOLATION(CS) -
OWNER(DB2FT) -
QUALIFIER(PROD) -


But at least you show some information to work with.

For what I can tell, PGMA is bound into Collection TEST. See here:
Quote:

DSN SYSTEM(DB2X) BIND PACKAGE(TEST) ACTION(REP) CURRENTDATA(NO) DYNAMICRULES(BIND) EXPLAIN(YES) ISOLATION(CS) MEMBER(PGMA) OWNER(SYDB2FT) PATH("SYSIBM","SYSFUN","SYSPROC") QUALIFIER(SYDB2FT) RELEASE(COMMIT)


This program is run as part of Plan DBPL001. This may be a generic high level plan. It would be nice to see the package list for it found in SYSIBM.SYSPACKLIST. See here:
Quote:

DSN SYSTEM(DB2X)
RUN PROGRAM(PGMA) PLAN(DBPL0001)


It must be assumed that PGMB is not a DB2 program, since you say 'no package'

It does have a plan, I am guessing because PGMB calls a DB2 subroutine:
MEMBER(DSN9BC80). Please confirm this.

So any way, more information is needed.

What does the Bind statement look like for Plan DBPL0001? If you can not find it, then show the entries in SYSIBM.SYSPACKLIST where PLANNAME = 'DBPL001'.

What is the deal with PGMB calling DSN9BC80? Show the entries in SYSIBM.SYSPACKAGE table where NAME = 'DSN9BC80'.

As you can see, the current Package/Plan structure pays a important role on how to handle your situation.

In order for this to work either PLANB will need to be bound to include a PKLIST with both PGMA and DSN9BC80 or some sort of wild card or maybe Plan DBPL0001 already contains DSN9BC80 or some wildcard.

If this is too confusing, and you do not want to pursue this further, do me a courtesy and let me know.
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1278
Location: Belgium

PostPosted: Wed Mar 31, 2010 8:26 pm    Post subject:
Reply with quote

Dave,
I think you're overlooking DBRMs bound into a plan.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 645
Location: Pennsylvania

PostPosted: Wed Mar 31, 2010 8:40 pm    Post subject:
Reply with quote

At our shop, we do not Bind DBRMs to Plans.

We Bind the DBRMs/Packages in collections where all the packages in the collection has the same qualifier.

We then Bind the Plan simply pointing to the collection.*.

This way a new Package can be added to the collection without the Plan having to be rebound.

If you remember your school days...

Collection is to Packages
as
Loadlib is to Load Modules

PKLIST is to Collections
as
Joblib is to Loadlibs

Here is an example of how we bind a plan...
Code:

BIND PLAN (DBAXXXXX) OWNER(DBAOWN) PKLIST(DBA_PACKAGES.*) VALIDATE(RUN) ISOLATION(CS)
CURRENTDATA(NO) DEGREE(1) RETAIN
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1278
Location: Belgium

PostPosted: Wed Mar 31, 2010 9:07 pm    Post subject:
Reply with quote

Nobody should bind dbrms into plans anymore. I think it's not even possible anymore in DB2 9.
But that doesn't mean that Abijoy's shop doesn't use them anymore.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 645
Location: Pennsylvania

PostPosted: Wed Mar 31, 2010 9:31 pm    Post subject:
Reply with quote

I realize that, thus so many questions for him regarding how things are setup.

His initial request was how to do it without binding into a single plan.

I do not know if that is a possibility.
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1278
Location: Belgium

PostPosted: Wed Mar 31, 2010 9:51 pm    Post subject:
Reply with quote

If (and it looks like it) PGMB uses a DBRM-plan then the answer is no.

He should add/bind DSN9BC80 to the TEST collection or any other collection that is part of DBPL0001.

of if DSN9BC80 is already in a collection, check if and if not add that collection to the pklist of DBPL0001


But this shouldn't be a concern of an application developer. It should be part of dba/sysprog/architects jobdescription to set up a working environment.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 645
Location: Pennsylvania

PostPosted: Wed Mar 31, 2010 9:59 pm    Post subject:
Reply with quote

Guy,

You got it. Pretty much what I summerized.

We will see how Abijoy responds.
Back to top
View user's profile Send private message
Abijoy

New User


Joined: 24 Mar 2010
Posts: 12
Location: Bangalore

PostPosted: Thu Apr 01, 2010 1:18 pm    Post subject: Reply to: Executing program which have different plans
Reply with quote

Hi Dave/GuyC,

Your discussion has helped me to understand how to approach this problem. Let me try to solve one inconsistency in my previous post.

Quote:
PGM-A is bound to PLAN-A and PGM-B is bound to PLAN-B

The above should have been
PGM-A uses PLAN-A and PGM-B uses PLAN-B for execution.

My shop uses collection, but the PGM-B is a pretty old one and it use a DBRM-PLAN as GuyC said. I had the DBA add this (DSN9BC80 ) to the same collection of PGM-A and now it is executes with the same plan (DBPL0001).

To summarize what i understand,
if PGMA is in COLLECTION1 and uses PLAN1 to execute
and PGMB is in COLLECTION2 and uses PLAN2 to execute
and PGMA calls PGMB, then it is not possible to execute PGMA unless we have PGMB added to COLLECTION1.
Please let me know if this statement needs a correction.

Thanks.
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1278
Location: Belgium

PostPosted: Thu Apr 01, 2010 3:02 pm    Post subject:
Reply with quote

not exactly,

one plan can have several collections in it Packagelist (SYSIBM.SYSPACKLIST)

each collection can have several packages (SYSIBM.SYSPACKAGES where COLLID = ?)

As long as all the packages used (= programs called) are found in any collection of the pklist of the plan , it's ok.
Back to top
View user's profile Send private message
Abijoy

New User


Joined: 24 Mar 2010
Posts: 12
Location: Bangalore

PostPosted: Mon Apr 05, 2010 12:37 pm    Post subject: Reply to: Executing program which have different plans
Reply with quote

Great info.. thanks.
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 I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 13 Tue Dec 06, 2016 8:30 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts A sample of exit program for exit XMN... lind sh CICS 2 Mon Oct 03, 2016 5:07 pm
No new posts Need points to tune IMS Checkpoint Pr... satish.ms10 IMS DB/DC 2 Fri Sep 30, 2016 4:12 pm
No new posts ISPF program to set SCRNAME prino TSO/ISPF 5 Fri Sep 30, 2016 2:18 pm


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