System info: OS/6.1, 9117-MMB-770.
Can you run a full system save from the HMC in a CL pgm? here is my code so far:
PGM
DCL VAR(&DATE) TYPE(*CHAR) LEN(6)
DCL VAR(&TAPE) TYPE(*CHAR) VALUE(TAP02)
CHGJOB RUNPTY(19) JOBQ(QSYS/QCTL) LOG(0 00 *SECLVL) +
LOGCLPGM(*YES) BRKMSG(*NOTIFY) +
TIMESLICE(99999)
CHGMSGQ MSGQ(*USRPRF) DLVRY(*HOLD)
MONMSG MSGID(CPF2451)
CHGMSGQ MSGQ(*WRKSTN) DLVRY(*NOTIFY)
RTVSYSVAL SYSVAL(QDATE) RTNVAR(&DATE)
ENDSBS SBS(*ALL) OPTION(*CNTRLD) DELAY(30) +
BCHTIMLMT(7777)
MONMSG MSGID(CPF0968) /* System ended to restricted +
condition. */
INZTAP DEV(&TAPE) NEWVOL(&DATE) +
NEWOWNID(TSTSYSSAV) CHECK(*NO)
DLYJOB DLY(300)
SAVSYS DEV(&TAPE) ENDOPT(*LEAVE)
SAVLIB LIB(*NONSYS) DEV(&TAPE) ENDOPT(*LEAVE) +
ACCPTH(*YES)
SAVDLO DLO(*ALL) FLR(*ANY) DEV(&TAPE) ENDOPT(*LEAVE)
SAV DEV('qsys.lib&TAPE.devd&TAPE') OBJ(('/*') +
('/QSYS.LIB' *OMIT) ('/QDLS' *OMIT)) +
ENDOPT(*REWIND) UPDHST(*YES)
DSPTAP DEV(&TAPE) OUTPUT(*PRINT)
Software/Hardware used:
Os/6.1, 9117-MMB-770
ASKED:
August 21, 2012 4:29 PM
Sure, you could do it; but why would anyone want to?
Now, there are a couple fundamental problems with your code.
First, you didn’t specify a job name in your CHGJOB statement. You have the JOBQ() parameter, but that is only meaningful against a job that is currently on a jobq. You can’t change the jobq of the current job, so a job name must be supplied and it must be for a different job.
Second, you ran ENDSBS *ALL with no error handling at all — you merely ignore a particular condition. You risk putting your system into an unuseable state until you can force an IPL. Further, you don’t test to see if restricted state has been achieved; you jump straight to your saves. It’s almost guaranteed that restricted state will take a couple minutes or so to arrive. By that time, your SAVSYS command will probably already have failed. Your INZSYS command might take long enough, but it can’t be expected.
That’s about all that can be said for now.
Tom