473,503 Members | 1,655 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How To Find The Plan For A Program

Hi,

I've been searching this newsgroup for an answer to my question, and
the closest I've come asks my question, but in reverse ("How to figure
out the program from plan/package"). I've -- shall we say, inherited?
-- a COBOL program with very little documentation that I've recompiled
for debugging purposes. The compile/link/bind have all been done, but
nothing in the output tells me what plan the program has been bound to,

so I can't execute until I know. I imagine that somewhere in the SYSIBM

tables I can find the information, but so far I haven't found the right

table.
Any help would be appreciated.
Thanks,
John

P.S. I previously posted this request in 'bit.*listserv.*db2-l'. I
should have cross-posted, so if you get this twice, sorry 'bout that...

Nov 30 '06 #1
10 13541
In article <11*********************@f1g2000cwa.googlegroups.c om>,
ca******@gmail.com says...
Hi,

I've been searching this newsgroup for an answer to my question, and
the closest I've come asks my question, but in reverse ("How to figure
out the program from plan/package"). I've -- shall we say, inherited?
-- a COBOL program with very little documentation that I've recompiled
for debugging purposes. The compile/link/bind have all been done, but
nothing in the output tells me what plan the program has been bound to,

so I can't execute until I know. I imagine that somewhere in the SYSIBM

tables I can find the information, but so far I haven't found the right

table.
Any help would be appreciated.
Thanks,
John

P.S. I previously posted this request in 'bit.*listserv.*db2-l'. I
should have cross-posted, so if you get this twice, sorry 'bout that...
Which DB2 version on which OS are you using?
Nov 30 '06 #2
....
Which DB2 version on which OS are you using?
....

I'm using DB2V7 on z/OS 1.05.00. Is this something that would be
release-dependent?

Nov 30 '06 #3

OppThumb wrote:
...
Which DB2 version on which OS are you using?
...

I'm using DB2V7 on z/OS 1.05.00. Is this something that would be
release-dependent?
Try asking the question on the DB2-L listserve email newsgroup, this
group is primarily for Windows and Linux

In 1994, I sent the following email to li******@www.idugdb2-l.org
<li******@www.idugdb2-l.org

with db2-l list application in the title

and

subscribe db2-l Larry Ludwig

in the body of the message (all on its own)
I heve including the following message that I got when subscribing,
which should provide additional help. If the details have changed
since I subscribed then a web search should dig up the necessary info.

++++++++++++++++++++++++++++++++++++++++++++++++++ +++

Your subscription to the DB2-L list (DB2 Database Discussion list
at
IDUG) has been accepted.

Please save this message for future reference, especially if this is
the
first time you are subscribing to an electronic mailing list. If you
ever
need to leave the list, you will find the necessary instructions
below.
Perhaps more importantly, saving a copy of this message (and of
all
future subscription notices from other mailing lists) in a special
mail
folder will give you instant access to the list of mailing lists that
you
are subscribed to. This may prove very useful the next time you go
on
vacation and need to leave the lists temporarily so as not to fill
up
your mailbox while you are away! You should also save the
"welcome
messages" from the list owners that you will occasionally receive
after
subscribing to a new list.

To send a message to all the people currently subscribed to the
list,
just send mail to DB***@WWW.IDUGDB2-L.ORG. This is called "sending
mail
to the list," because you send mail to a single address and
LISTSERV
makes copies for all the people who have subscribed. This
address
(DB***@WWW.IDUGDB2-L.ORG) is also called the "list address." You
must
never try to send any command to that address, as it would be
distributed
to all the people who have subscribed. All commands must be sent to
the
"LISTSERV address," LI******@WWW.IDUGDB2-L.ORG. It is very important
to
understand the difference between the two, but fortunately it is
not
complicated. The LISTSERV address is like a FAX number that connects
you
to a machine, whereas the list address is like a normal voice
line
connecting you to a person. If you make a mistake and dial the FAX
number
when you wanted to talk to someone on the phone, you will quickly
realize
that you used the wrong number and call again. No harm will have
been
done. If on the other hand you accidentally make your FAX call
someone's
voice line, the person receiving the call will be
inconvenienced,
especially if your FAX then re-dials every 5 minutes. The fact that
most
people will eventually connect the FAX machine to the voice line to
allow
the FAX to go through and make the calls stop does not mean that
you
should continue to send FAXes to the voice number. People would just
get
mad at you. It works pretty much the same way with mailing lists,
with
the difference that you are calling hundreds or thousands of people
at
the same time, and consequently you can expect a lot of people to
get
upset if you consistently send commands to the list address.

You may leave the list at any time by sending a "SIGNOFF DB2-L"
command
to LI******@WWW.IDUGDB2-L.ORG. You can also tell LISTSERV how you want
it
to confirm the receipt of messages you send to the list. If you do
not
trust the system, send a "SET DB2-L REPRO" command and LISTSERV will
send
you a copy of your own messages, so that you can see that the message
was
distributed and did not get damaged on the way. After a while you
may
find that this is getting annoying, especially if your mail program
does
not tell you that the message is from you when it informs you that
new
mail has arrived from DB2-L. If you send a "SET DB2-L ACK
NOREPRO"
command, LISTSERV will mail you a short acknowledgement instead,
which
will look different in your mailbox directory. With most mail
programs
you will know immediately that this is an acknowledgement you can
read
later. Finally, you can turn off acknowledgements completely with
"SET
DB2-L NOACK NOREPRO".

Contributions sent to this list are automatically archived. You can get
a
list of the available archive files by sending an "INDEX DB2-L"
command
to LI******@WWW.IDUGDB2-L.ORG. You can then order these files with a
"GET
DB2-L LOGxxxx" command, or using LISTSERV's database search
facilities.
Send an "INFO DATABASE" command for more information on the latter.

This list is available in digest form. If you wish to receive
the
digested version of the postings, just issue a SET DB2-L DIGEST
command.

More information on LISTSERV commands can be found in the
LISTSERV
reference card, which you can retrieve by sending an "INFO
REFCARD"
command to LI******@WWW.IDUGDB2-L.ORG.

Nov 30 '06 #4
Did you check the output of the bind? The plan name (or package name) is
defined in the bind step SYSIN DD statement. If you can't find the
output, check the JCL stream for the BIND statement.

Phil Sherman

OppThumb wrote:
Hi,

I've been searching this newsgroup for an answer to my question, and
the closest I've come asks my question, but in reverse ("How to figure
out the program from plan/package"). I've -- shall we say, inherited?
-- a COBOL program with very little documentation that I've recompiled
for debugging purposes. The compile/link/bind have all been done, but
nothing in the output tells me what plan the program has been bound to,

so I can't execute until I know. I imagine that somewhere in the SYSIBM

tables I can find the information, but so far I haven't found the right

table.
Any help would be appreciated.
Thanks,
John

P.S. I previously posted this request in 'bit.*listserv.*db2-l'. I
should have cross-posted, so if you get this twice, sorry 'bout that...
Nov 30 '06 #5

OppThumb wrote:
Hi,

I've been searching this newsgroup for an answer to my question, and
the closest I've come asks my question, but in reverse ("How to figure
out the program from plan/package"). I've -- shall we say, inherited?
-- a COBOL program with very little documentation that I've recompiled
for debugging purposes. The compile/link/bind have all been done, but
nothing in the output tells me what plan the program has been bound to,

so I can't execute until I know. I imagine that somewhere in the SYSIBM

tables I can find the information, but so far I haven't found the right

table.
Any help would be appreciated.
Thanks,
John

P.S. I previously posted this request in 'bit.*listserv.*db2-l'. I
should have cross-posted, so if you get this twice, sorry 'bout that...
If you rebind the plan with EXPLAIN=YES and the look in the table
called PLAN_TABLE there is column called PROGNAME. There may be an
easier way, but I don't know offhand what it is.

Dec 1 '06 #6
Sorry Mark as this won't work as he doesn't know his plan-name so what will
he rebind?

Phil was right in that he should look at the held output job he used to
re-compile/link/bind and do an SJ there so he can see the sysin which shows
the planname. If the held output is not there anymore, then query
SYSIBM.SYSPLAN and look for the timestamp having the same time as when he
did his recompile and that should be the associated plan.

HTH,
Ven

"Mark A" <m0****@yahoo.comwrote in message
news:11*********************@16g2000cwy.googlegrou ps.com...

OppThumb wrote:
Hi,

I've been searching this newsgroup for an answer to my question, and
the closest I've come asks my question, but in reverse ("How to figure
out the program from plan/package"). I've -- shall we say, inherited?
-- a COBOL program with very little documentation that I've recompiled
for debugging purposes. The compile/link/bind have all been done, but
nothing in the output tells me what plan the program has been bound to,

so I can't execute until I know. I imagine that somewhere in the SYSIBM

tables I can find the information, but so far I haven't found the right

table.
Any help would be appreciated.
Thanks,
John

P.S. I previously posted this request in 'bit.*listserv.*db2-l'. I
should have cross-posted, so if you get this twice, sorry 'bout that...
If you rebind the plan with EXPLAIN=YES and the look in the table
called PLAN_TABLE there is column called PROGNAME. There may be an
easier way, but I don't know offhand what it is.
Dec 2 '06 #7
"Ven Ilagan" <vc******@optusnet.com.auwrote in message
news:45**********************@news.optusnet.com.au ...
Sorry Mark as this won't work as he doesn't know his plan-name so what
will he rebind?

Phil was right in that he should look at the held output job he used to
re-compile/link/bind and do an SJ there so he can see the sysin which
shows the planname. If the held output is not there anymore, then query
SYSIBM.SYSPLAN and look for the timestamp having the same time as when he
did his recompile and that should be the associated plan.

HTH,
Ven
I agree that one should be able to see easily see the plan name in the
compile/link/bind job output, but one of the questions he asked was how do
you get the program name if you know the plan name.

One can easily create a script to rebind all plans. I have often done this
to put all the explains in the plan_table for analysis.
Dec 2 '06 #8
Thanks for all the input, everyone, but I ended up taking a WAG (Wild
A$$ Guess, if you never heard that before) that worked. I'm not sure
WHY it worked, though, so maybe someone can explain that one.

The plan name was not listed in the job output of the BIND, and there
was no SYSIN DD statement. I found the COLLID, however, so I decided to
go back over to DB2, and in SYSIBM.SYSPACKLIST I found all the rows
with matching COLLIDs. From there, I looked to see if any values in the
NAME column matched my program name.

I got no matches, but there was a row that had a wildcard ('*') value,
so following this trail, I used the PLANNAME value from this row, and
it worked. I suppose my final question, then, is this -- did I just get
lucky, or could this be considered a valid process to get this kind of
information in the future?

Thanks,

John

Dec 7 '06 #9
There are two different methods of binding on DB2 for z/OS.

The older method is used when you statically link many COBOL
sub-programs into one giant load module. In this case, you would bind
all the associated DBRMs (database request modules) into one big plan.
If this is the case, you can look in SYSIBM.SYSDBRM to see the plan
associated with the program. The DBRM name is the same as your COBOL
program name.

The new method is to bind a package with each COBOL program (main or
sub-program). The package is identified by location, collection id,
name, and version. Unlike DB2 for LUW, a plan is always required for
DB2 for z/OS. A plan is bound with to include package lists. This
allows a sub-program to be run under multiple plans. To find which
plan to use at execution time, you would query SYSIBM.SYSPACKLIST to
find the list(s) that qualify your package. You may end up with
multiple plans. The correct plan to run usually depends on security
requirements that are implemented by different plans.

The newer method is almost always used for new applications. It
reduces catalog contention during rebinds and has a closer matching of
load modules to packages reducing "Package not found" or "Consistency
token mis-matches".

Hope this clears things up a bit.

Norm

OppThumb wrote:
Thanks for all the input, everyone, but I ended up taking a WAG (Wild
A$$ Guess, if you never heard that before) that worked. I'm not sure
WHY it worked, though, so maybe someone can explain that one.

The plan name was not listed in the job output of the BIND, and there
was no SYSIN DD statement. I found the COLLID, however, so I decided to
go back over to DB2, and in SYSIBM.SYSPACKLIST I found all the rows
with matching COLLIDs. From there, I looked to see if any values in the
NAME column matched my program name.

I got no matches, but there was a row that had a wildcard ('*') value,
so following this trail, I used the PLANNAME value from this row, and
it worked. I suppose my final question, then, is this -- did I just get
lucky, or could this be considered a valid process to get this kind of
information in the future?

Thanks,

John
Dec 9 '06 #10
"Norm" <w_******@hotmail.comwrote in message
news:11**********************@n67g2000cwd.googlegr oups.com...
There are two different methods of binding on DB2 for z/OS.

The older method is used when you statically link many COBOL
sub-programs into one giant load module. In this case, you would bind
all the associated DBRMs (database request modules) into one big plan.
If this is the case, you can look in SYSIBM.SYSDBRM to see the plan
associated with the program. The DBRM name is the same as your COBOL
program name.

The new method is to bind a package with each COBOL program (main or
sub-program). The package is identified by location, collection id,
name, and version. Unlike DB2 for LUW, a plan is always required for
DB2 for z/OS. A plan is bound with to include package lists. This
allows a sub-program to be run under multiple plans. To find which
plan to use at execution time, you would query SYSIBM.SYSPACKLIST to
find the list(s) that qualify your package. You may end up with
multiple plans. The correct plan to run usually depends on security
requirements that are implemented by different plans.

The newer method is almost always used for new applications. It
reduces catalog contention during rebinds and has a closer matching of
load modules to packages reducing "Package not found" or "Consistency
token mis-matches".

Hope this clears things up a bit.

Norm
Using plans (without packages) instead of packages is only problem for CICS
programs. It is not a problem for batch programs, and many people still use
plans for batch programs (one program per plan). Some people do use packages
for batch programs, but there is no serious advantage to it.

The reason for the problem of plans with CICS is that you cannot switch
plans when you XCTL to another CICS program, so that when using plans, all
the DBRMs for every program in an application had to be bound in the same
plan. You can switch plans with a CICS Start Transaction, but that is a very
expensive operation. That is why packages were introduced in DB2 for MVS
3.1.
Dec 9 '06 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2198
by: Cyril Vi?ville | last post by:
As it's written in the subject, i would like to know how can i find which program modified a file (last access, last changed). By example: Example.txt in a log directory I need to know which...
2
1268
by: Jim Heavey | last post by:
I am tyring to figure out why a class that I am trying to instatiate can not be found. I am NOT WORKING WITH PRE_COMPILED code. I am dragging the source code over and placing the code in a...
4
2667
by: Edward | last post by:
hi, everyone, my Page_Load fill tblProducts with some TextBox. <form runat="server"> <asp:Table id="tblProducts" runat="server"></asp:Table> <hr> <asp:Button id="Button1"...
4
1333
by: I_AM_DON_AND_YOU? | last post by:
Hi Cor: You have given a very good suggestion that I can directly reference the "Program Files" Folder. Actually my vb.net program reads/write a notepad file record.txt. For example, the name...
0
1002
by: fdu.xiaojf | last post by:
Hi, When I want to uninstall my usb disk on windows, the operating systems sometimes tells me the device is being used by other program. But I can't find which program is using it. Can I do this...
1
1724
by: greyhoundz102 | last post by:
pls help me to make a program on how to display printer lists in my computer wid the ff info: printer name drivername port name processor name comment location.. tnx so much.
6
1414
by: nobrow | last post by:
I need a syntactically comprehensive test program to test a C parser on. Does anyone know where I might find a program that uses all syntactical elements of the language and combines them in...
7
1773
by: Jason Heyes | last post by:
Why can't I use the find algorithm to find a program argument in the following way? std::find(argv, argv + argc, "-v") Thanks.
2
2204
by: Richard Hollenbeck | last post by:
I originally wrote my grades program in MS-Access to help community college teachers in the California community colleges keep track of their students' grades and produce reports for the students...
3
3228
by: Soulless | last post by:
Hi, I have created a batch file in C# and want to find and place it in the path of an installed application. Now, this might be done on an XP, 2000, etc system. The application is installed...
0
7083
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7278
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7328
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6988
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5011
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3153
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
734
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
379
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.