Z/OS DB2 Question (Ver 7)

Mallik

Z/OS DB2 Question (Ver 7)
Hello,

I am working Mainframe DB2 (Version 7) . I have a DB2 COBOL program running
on IBM Mainframe (Z/OS). I need to capture its associated DB2 Plan with in
this COBOL program under which it is running. Depending upon the DB2 plan
that this program is running under, I need to do some process. How can I
capture it in my COBOL program.

Note: This program is defined in lot of DB2 package collections and these
collection are part of many DB2 Plans.

Any info is appreciated...

Thanks,
Mallik

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

Phil Grainger

Re: Z/OS DB2 Question (Ver 7)
(in response to Mallik)
In v8 (sorry) it's easy - you can use the GET_VARIABLE() function to
retrieve all sorts of things (like current plan name)

In v7, I don't know of any way to do this, unless you want to go
horribly complicated and use IFI to do a -DISPLAY THREAD(*) and try and
work out which thread is "you" to determine your plan name. Not
something I'd recommend


Phil Grainger
CA
Product Manager, DB2
Tel: +44 (0)161 928 9334
Fax: +44 (0)161 941 3775
Mobile: +44 (0)7970 125 752
[login to unmask email]


-----Original Message-----
From: DB2 Data Base Discussion List [mailto:[login to unmask email] On
Behalf Of Mallik
Sent: 11 January 2006 13:43
To: [login to unmask email]
Subject: [DB2-L] Z/OS DB2 Question (Ver 7)

Hello,

I am working Mainframe DB2 (Version 7) . I have a DB2 COBOL program
running on IBM Mainframe (Z/OS). I need to capture its associated DB2
Plan with in this COBOL program under which it is running. Depending
upon the DB2 plan that this program is running under, I need to do some
process. How can I capture it in my COBOL program.

Note: This program is defined in lot of DB2 package collections and
these collection are part of many DB2 Plans.

Any info is appreciated...

Thanks,
Mallik

------------------------------------------------------------------------
---------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and
home page at http://www.idugdb2-l.org/archives/db2-l.html. From that
page select "Join or Leave the list". The IDUG DB2-L FAQ is at
http://www.idugdb2-l.org. The IDUG List Admins can be reached at
[login to unmask email] Find out the latest on IDUG conferences
at http://conferences.idug.org/index.cfm

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

Basivi Inaganti

Re: Z/OS DB2 Question (Ver 7)
(in response to Phil Grainger)
Hi Mallik,
May be it will work, if you have to get the plan name at any cost and
don't have any other way.

1) Generate an -805 in your program by calling a non-existing package.
2) Work on SQLERRMC in SQLCA to get the plan name.

Thanks,
Basivi Inaganti
Database Administration
Office: 614-213-5324
Pager: 888-354-5236
Pager email: [login to unmask email]
email: [login to unmask email]




"Grainger, Phil" <[login to unmask email]>
Sent by: DB2 Data Base Discussion List <[login to unmask email]>
01/11/2006 09:22 AM
Please respond to DB2 Database Discussion list at IDUG

To: [login to unmask email]
cc:
Subject: Re: [DB2-L] Z/OS DB2 Question (Ver 7)


In v8 (sorry) it's easy - you can use the GET_VARIABLE() function to
retrieve all sorts of things (like current plan name)

In v7, I don't know of any way to do this, unless you want to go
horribly complicated and use IFI to do a -DISPLAY THREAD(*) and try and
work out which thread is "you" to determine your plan name. Not
something I'd recommend


Phil Grainger
CA
Product Manager, DB2
Tel: +44 (0)161 928 9334
Fax: +44 (0)161 941 3775
Mobile: +44 (0)7970 125 752
[login to unmask email]


-----Original Message-----
From: DB2 Data Base Discussion List [mailto:[login to unmask email] On
Behalf Of Mallik
Sent: 11 January 2006 13:43
To: [login to unmask email]
Subject: [DB2-L] Z/OS DB2 Question (Ver 7)

Hello,

I am working Mainframe DB2 (Version 7) . I have a DB2 COBOL program
running on IBM Mainframe (Z/OS). I need to capture its associated DB2
Plan with in this COBOL program under which it is running. Depending
upon the DB2 plan that this program is running under, I need to do some
process. How can I capture it in my COBOL program.

Note: This program is defined in lot of DB2 package collections and
these collection are part of many DB2 Plans.

Any info is appreciated...

Thanks,
Mallik

------------------------------------------------------------------------
---------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and
home page at http://www.idugdb2-l.org/archives/db2-l.html. From that
page select "Join or Leave the list". The IDUG DB2-L FAQ is at
http://www.idugdb2-l.org. The IDUG List Admins can be reached at
[login to unmask email] Find out the latest on IDUG conferences
at http://conferences.idug.org/index.cfm

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and
home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page
select "Join or Leave the list". The IDUG DB2-L FAQ is at
http://www.idugdb2-l.org. The IDUG List Admins can be reached at
[login to unmask email] Find out the latest on IDUG conferences
at http://conferences.idug.org/index.cfm


---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm