Looking for relevant AS/400 Whitepapers? Visit the Search400.com Research Library.
Wpoulin | May 15 2008 1:45PM GMT
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
Wpoulin | May 16 2008 12:30PM GMT
Gordon,
You can reach me at <a href="mailto:wpoulin@rev.state.nh.us.">wpoulin@rev.state.nh.us.</a>
Thanks,
Bill
TSCHMITZ | May 19 2008 6:56AM GMT
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.
TonyRa | May 19 2008 1:59PM GMT
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