Stop Subsystems Automatically

cdawes

VIP Member
I'm running DB2 UDB on Intel. I run a cold backup every night. As part of my start up script I wrote a couple DB2 procedures to clear the F986113 (Subsystem Table) and then I run some RUNUBE's to restart the subsystem. This start up process works fine.

Now for the shut down process I need something that will shut down the subsystems from a CMD line or from a UBE. Does anyone know how? If I don't shut down the subsystems then I get orphan runbatch.exe jobs which prevent the system from starting up properly.

As part of the shut down script I run a seriers of kill's to destroy the runbatch process but it doesn't kill all the processes (I've tried do loops, waits, etc.)

Anyone else trying to shut dwon subsystems automatically?


Thanks

Colin
 
Colin

Issue the following SQL statement against the database. This stops the subsystem and ends the ube clean as a whistle.

UPDATE SVM7333.F986113 SET SSJOBSTS = 'E', SSOPCR = 'E' WHERE sspid='R42520';

Regards
Marty
 
Hi Colin,
We do the same thing as Marty but wrote a custom UBE to do the insert. The UBE has parms for UBE, Version and whether to go into W (wait until all transactions have ended) or E (end immediately). The UBE populates the rest of the columns in the F986113 appropriately.

Sue Shaw

Xe Coexistent SP22Q1 iSeries V5R2
 
Basically all you need to do is run the SQL statement:

update SVM7333/F986113
SET SSOPCR = 'W' , SSJOBPTY = '0'
WHERE SSJOBSTS = 'S';

This updates the correct fields.
Tried it this weekend and it works great! I actually pulled the logic from P986113. This allows JDE to end the job in the same way as clicking END SUBSYSTEM JOBS.
 
Help me

please you can post the script that does this: "... As part of my start up script I wrote a couple DB2 procedures to clear the F986113 (Subsystem Table) and then I run some RUNUBE's to restart the subsystem. This start up process works fine."
 
Back
Top