DB2 Monitor Program

Irwin Deutsch

DB2 Monitor Program
Hi and Happy New Year to all!

I'm writing a DB2 V7 monitor program that waits on certain IFCIDs, and
then records audit information. It should be up as long as DB2, which
gets recycled weekly. I haven't found out a way yet how to signal the
program when DB2 is coming down, so I can bring down my batch job (under
DSN processor). I would have thought there was an IFCID that indicates
'shutdown' , but I haven't found it yet.

Any ideas out there?


Thanks,

Irwin Deutsch
AIG

---------------------------------------------------------------------------------
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

James Campbell

Re: DB2 Monitor Program
(in response to Irwin Deutsch)
I can think of several ways of doing this

1) reading IFCID 90 (Command text) and looking for a STOP DB2 command. This won't, of
course, happen if there is a DB2 abend.

2) using DSNALI (Call Attach) or DSNRLI (RRSAF Attach) instead of the DSN processor.
They have a termecb parameter in their (for DSNALI) CONNECT / (for DSNRLI) IDENTIFY
call. This ecb will be posted when DB2 is coming down - even if there is an abend. A bit
more complex as you need a timing loop to check for the ecb being posted; or have
assembler code to wait on the ecb (but then it can wait for both termecb and WBUFECB in a
single wait).

3) waking up every so often and checking to see if the DB2 MSTR address space is alive. If
not, then DB2 has been stopped.

4) getting your automation tool (which, presumably, correctly identifies DB2 stopping) to do
"something" to notify your program.


James Campbell

On 3 Jan 2007 at 11:09, Deutsch, Irwin wrote:

>
> Hi and Happy New Year to all!
> I'm writing a DB2 V7 monitor program that waits on certain IFCIDs, and then records audit
> information. It should be up as long as DB2, which gets recycled weekly. I haven't found out a
> way yet how to signal the program when DB2 is coming down, so I can bring down my batch job
> (under DSN processor). I would have thought there was an IFCID that indicates 'shutdown' , but I
> haven't found it yet.
> Any ideas out there?
>
> Thanks,
> Irwin Deutsch
> AIG
> --------------------------------------------------------------------------------- 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 DB2-L-
> [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