AS/400 V5R4 – Trying to run a system save in nightly routines.

140 pts.
Tags:
AS/400
ENDSBS
iseries v5r4
SAVSYS
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

Answer Wiki

Thanks. We'll let you know when a new response is added.

Without seeing your code or job log it is very hard to tell, but my first suspicion would be the BCHTIMLMT. Remember it is in minutes.

I am using this process thru the Job Scheduler and have been for many years. It does work.

Put a copy of your code or the job log for us to review.

Hope This Helps,
Bill Poulin

Discuss This Question: 8  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • ITDavid
    This procedure (attached photocopy) is in part of our auto Day End procedure within System 21 machine manager.
    PGM
    SBMJOB  CMD(ENDSBS SBS(*ALL) OPTION(*IMMED) BCHTIMLMT(120)) JOB(END_SUBS) JOBQ(QCTL)
    
    DLYJOB  DLY(300)
    
    the CLP then continues with INZTAP, SAYSYS & SAVLIB none of which run as the system begins its startup routines as soon as the system is in a restricted state (almost as if the BCHTIMLMT is set to less than a minute).
    
    David
    140 pointsBadges:
    report
  • wpoulin
    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
    2,480 pointsBadges:
    report
  • ITDavid
    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
    140 pointsBadges:
    report
  • wpoulin
    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
    2,480 pointsBadges:
    report
  • Rayj1031
    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)                            
                 ENDDO       
    
    
    335 pointsBadges:
    report
  • RossHowatson
    Within 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.
    265 pointsBadges:
    report
  • pdraebel
    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.
    2,895 pointsBadges:
    report
  • barakait

    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

    10 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following