AS/400 V5R4 - Trying to run a system save in nightly routines. ENDSYS *ALL submitted to QCTL with parameter BCHTIMLMT set for enough time for SAVSYS to run. System does go into restricted state but then Subsystem QCTL starts straight after (2 mins). How do I keep system in a resricted state? What am I missing?
Software/Hardware used:
OS/400 R5V4
ASKED:
June 24, 2010 3:24 PM
UPDATED:
June 28, 2010 7:44 AM
This procedure (attached photocopy) is in part of our auto Day End procedure within System 21 machine manager.
ITDavid,
I see that you are doing a SBMJOB to QCTL, but what Subsystem is the Program that I am looking at running in ?
In my mind this whole program should be Submitted to Qctl and the first statement should be the EndSbs *all.
Hope this helps,
Bill Poulin
Bill
That makes sense, my only problem is that the Stystem/21 Program Manager runs from Qinter I believe. I shall look into this next week.
Thanks
David
ITDavid,
The whole idea of putting the system in a Restricted State is that all Subsystems are ended, (including Qinter) except for Qctl, the Controlling Subsystem and that no other jobs are running expect your Backup Job.
Hope this helps,
Bill Poulin
IBM recommends shutting down TCP/IP first.
I always initialize the tape before shutting down the system because if the tape fails, no point in shuttind down the system.
The code snippet from my backup program has been working for at least 2 years now:
SHUTDOWN1: ENDTCPSVR SERVER(*ALL) MONMSG MSGID(CPF9999 CPF0000) DLYJOB DLY(180) MONMSG MSGID(CPF9999 CPF0000) ENDTCP MONMSG MSGID(CPF9999 CPF0000) DLYJOB DLY(180) ENDWTR WTR(*ALL) OPTION(*IMMED) MONMSG MSGID(CPF9999 CPF0000) DLYJOB DLY(120) SHUTDOWN2: ENDSBS SBS(*ALL) OPTION(*IMMED) DELAY(30) BCHTIMLMT(300) /* BCHTIMLMT should start the system again at 0600. */ /* Ignore any errors - try to get a backup. */ MONMSG MSGID(CPF0000 MCH0000) DLYJOB DLY(600) /* wait for 10 minutes for subsystems to end. */ ******************************************************************************/ * Add reply list entries to avoid tape failures. */ ******************************************************************************/ ADDRPYLE SEQNBR(2001) MSGID(CPA4088) RPY(C) MONMSG CPF2555 ADDRPYLE SEQNBR(2002) MSGID(CPA4086) RPY(C) MONMSG CPF2555 ADDRPYLE SEQNBR(2003) MSGID(CPA4278) RPY(I) MONMSG CPF2555 ******************************************************************************/ * Start a full system backup. */ ******************************************************************************/ SAVSYS: IF COND(&DAY = *THU) THEN(DO) SAVSYS DEV(&DEVD) ENDOPT(*LEAVE) MONMSG MSGID(CPF0000 CPF9999) SNDMSG MSG('@@@@ SAVSYS completed.') TOMSGQ(*HSTLOG) MONMSG MSGID(CPF0000 CPF9999) ENDDOWithin BRMS and a tape magazine unit you can set this up and it will automatically shut down the subsystems, find and clear an available tape, do the full system save and restart the system. The only fancy code is adding a reply list entry beforehand and removing this afterwards.
We do a weekly save of the entire system with BRMS. We have a Backup procedure running and in the weelly process it checks if the BRMS console monitor is running. If it is not we do a normal save, if it is we Submit a control group to the BRMS console. BRMS starts QCTL after the save completes.
dear,
i have a question, if we want to do a policy before starting the End Of Day (as400 system, equation system) what you have from ideas to help us on it?
thanks in advanced