IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to get the plan name in the runtime


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Kiran Chava

New User


Joined: 07 Jul 2010
Posts: 9
Location: India

PostPosted: Tue Mar 08, 2011 10:37 pm
Reply with quote

Hi,

Could anyone please tell me how to find the plan name during the runtime.

I am running a DB2 proc using a work load manager. I need to know which plan/database is being used.
Back to top
View user's profile Send private message
Pons

New User


Joined: 25 May 2007
Posts: 61
Location: Coimbatore

PostPosted: Tue Mar 08, 2011 11:30 pm
Reply with quote

Guess, this is realted to DB2 question. But this is an COBOL forum...
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Wed Mar 09, 2011 12:51 am
Reply with quote

Hello and welcome to the forum,

Just curious - why does someone believe this is needed at runtime?
Back to top
View user's profile Send private message
Kiran Chava

New User


Joined: 07 Jul 2010
Posts: 9
Location: India

PostPosted: Wed Mar 09, 2011 8:58 am
Reply with quote

We have to write the database name to a file which we will be sending to a datawarehousing application. We cant use a parm to get this info as this is being run thru a WLM.

I am running a DB2 proc using a work load manager. I need to know which plan/database is being used.

It would be fine even if I get the WLM name. I can derive the database name from that.
Back to top
View user's profile Send private message
don.leahy

Active Member


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

PostPosted: Wed Mar 09, 2011 6:25 pm
Reply with quote

Have you investigated the DB2 special registers? CURRENT SCHEMA, CURRENT PACKAGESET etc. Check the SQL reference manual, one of them might be what you are looking for.
Back to top
View user's profile Send private message
Kiran Chava

New User


Joined: 07 Jul 2010
Posts: 9
Location: India

PostPosted: Wed Mar 09, 2011 8:14 pm
Reply with quote

Thanks don.leahy the PACKAGESET has worked for me. I got the collid and based on that I derived the Database name.
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 -> DB2

 


Similar Topics
Topic Forum Replies
No new posts current batch plan DB2 3
No new posts Insert System Runtime in HEADER In SY... SYNCSORT 9
No new posts Log an Plan name/id or Job Id using D... DB2 1
No new posts Usage/Utiliy of Plan in DB2 DB2 4
No new posts How do I define a DB2 plan for a web ... CICS 5
Search our Forums:

Back to Top