Complete backup via CLP

25 pts.
Tags:
AS/400 backup
CLP
Command Line Processor
Isn't it possible to wrap the commands issued via GO SAVE option 21 in a CLP and run it via job scheduled entry, assuming proper authority, etc.?
ASKED: May 14, 2008  10:58 PM
UPDATED: May 19, 2008  1:59 PM

Answer Wiki

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

Hi,

No, it isn’t possible to do this because some of the save functions used in option 21 need the system to be in a restricted state (ie no subsystems active, so no batch jobs).

It is possible to do a complete (scheduled) system save using BRMS.

Regards,

Martin Gilbert.

Hi Bill Poulin,
Would you be willing to share your full system backup code with me, we have just lost 2 of our 3 operators and when our current operator is sick or on vacation I want to be able to automate the function. Sure would save me some time. Thanks in advance.

Larry Vogt
Programmer/Analyst
Hickory Farms
Larry.Vogt@HickoryFarms.com

Discuss This Question: 5  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
  • GLinds01
    Thanks for your help, Mr. Gilbert. Gordon
    25 pointsBadges:
    report
  • wpoulin
    I am doing a Full System Backup via a CL Program that is scheduled with the Job Scheduler. The trick is the job needs to be submitted to the QCTL Jobq Queue as opposed to QBATCH. Then you need to end all subsystems so the system is put into a restricted state. You then can issue the SAVSYS, SAVLIB *NONSYS etc. commands. I would be willing to share this code with you if you are interested. Thanks, Bill
    2,480 pointsBadges:
    report
  • wpoulin
    Gordon, You can reach me at wpoulin@rev.state.nh.us. Thanks, Bill
    2,480 pointsBadges:
    report
  • TSCHMITZ
    Hi GLinds01 , concerning your question "Isn't it possible to wrap the commands issued via GO SAVE option 21 in a CLP and run it via job scheduled entry, assuming proper authority, etc.? ", here is the solution we use. On the system console (running in QCTL subsystem), we initiate a interactifve job (BKPALLUSR) that is waiting for a specific message coming from the nightjobs process. This specific message is initiated by nightprocess on full backup day (saturday), and notify the console that all the night processes are finished and that machine is ready to be set up in restricted mode. Console job get the info, end all subsystems, wait for completion, and launch a CL issuing all the save included in "GO SAVE option 21". When backup is finished, machine is IPLed wih PWRDWNSYS restart(* yes). It work ok since a lot of years.
    470 pointsBadges:
    report
  • TonyRa
    This is a prototype of the process we have used for years. This does not shut the system down, but brings it to a restricted state. After everything is done, the command STRSBS SBSD(QCTL) restarts the system as if a PWRDWNSYS command had been issued. 700 PGM 800 DCL VAR(&WORKSTN) TYPE(*CHAR) LEN(10) 900 DCL VAR(&ACTSTAT) TYPE(*CHAR) LEN(10) 1000 DCL VAR(&USERID) TYPE(*CHAR) LEN(10) 1100 DCL VAR(&YESNO) TYPE(*CHAR) LEN(10) VALUE(X) 1200 DCL VAR(&RETURNCD) TYPE(*CHAR) LEN(2) 1300 DCL VAR(&FAXRETCD) TYPE(*CHAR) LEN(2) VALUE('00') 1400 CHGMSGQ MSGQ(QSYSOPR) DLVRY(*NOTIFY) 1500 RTVJOBA JOB(&WORKSTN) USER(&USERID) 1600 /* - - - - - - - - - - */ 1700 /* PLACE CL HERE TO SHUT DOWN VARIOUS JOBS AND PROCEDURES... */ 1800 /* - - - - - - - - - - */ 1900 DLYJOB DLY(15) 2000 RESTRT: 2100 CHGMSGQ MSGQ(QSYSOPR) DLVRY(*BREAK) 2200 SNDUSRMSG MSG('WARNING WARNING. ALL SYBSYSTEMS WILL BE + 2300 ENDED AT THIS POINT. IF ANY ONE IS ON + 2400 THE SYSTEM, THEY WILL BE KICKED OFF') + 2500 MSGTYPE(*INFO) TOMSGQ(*) 2600 SNDUSRMSG MSG('Type Y to continue with backup, N to + 2700 abort.') MSGTYPE(*INQ) TOMSGQ(*) + 2800 MSGRPY(&YESNO) 2900 IF COND(&YESNO *EQ 'N') THEN(GOTO CMDLBL(ENDALL)) 3000 IF COND(&YESNO *EQ 'Y') THEN(GOTO CMDLBL(DOITTO)) 3100 GOTO CMDLBL(RESTRT) 3200 /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 3300 DOITTO: 3400 ENDSBS SBS(*ALL) OPTION(*IMMED) ENDSBSOPT(*NOJOBLOG) 3500 DLYJOB DLY(30) 3600 CHGMSGQ MSGQ(QSYSOPR) DLVRY(*NOTIFY) 3700 /* - - - - - - - - - - */ 3800 INZTAP 3900 /* - - - - - - - - - - */ 4000 SAVSYS 4100 SAVLIB 4200 SAV 4300 SAVDLO 4400 DLYJOB DLY(15) 4500 /*- - - - RESTART ALL SUBSYSTEMS- SEE QSTRUP FOR LIST - - - - - - - - - */ 4600 STRSBS SBSD(QCTL) 4700 CHGMSGQ MSGQ(QSYSOPR) DLVRY(*BREAK) 4800 ENDPGM
    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