This is the program I run each week to do a full (unattended) system backup over the weekend. Just call the program and it runs on Sunday morning. Make sure to replace the device with your own and you can also extend the lines to fit the real-field length. It's a pretty simple program that allows easy backups and reclaims storage. This program also does an IPL at the end.
100 PGM
200
300/*CALL JOB FRIDAY ON MASTER CONSOLE*/
400/*DELAY JOB UNTIL MIDNIGHT SATURDAY*/
500 DLYJOB RSMTIME('23:30) /* DELAYS +
600 UNTIL 11:30 P.M. FRIDAY*/
700 DLYJOB DLY(3600) /* DELAYS 1HOUR +
800 UNTIL 12:30 A.M. SATURDAY*/
900 DLYJOB RSMTIME('00:01') /* +
1000 DELAYS UNTIL 12:01 A.M.SUNDAY*/
1100
1200 /*TERMINATE SUBSYSTEMS TO +
1300 RESTRICTED STATE.*/
1400 ENDSBS SBS(*ALL) OPTION(*IMMED)
1500 QSYS/DLYJOB DLY(900) WAIT 15 MINS*/
1600 /*SAVE ALL SYSTEM LIBS TO +
1700 OFFLINE TAPE*/
1800 QSYS/SAVSYS DEV(TAP02) ENDOPT +
(*LEAVE) DTACPR(*YES)
1900 MONMSG MSGID(CPF3777 CPF9999 +
CPF0000)
2000
2100 SAVLIB LIB(*NONSYS) DEV(TAP02) +
2200 ENDOPT(*LEAVE) CLEAR(*ALL) ACCPTH +
2300 (*YES) DTACPR(*YES)
2400 MONMSG MSGID(CPF0000)
2500 QSYS/SAVDLO DLO(*ALL) DEV(TAP02)+
2600 ENDOPT(*UNLOAD) DTACPR(*YES)
2700 MONMSG MSGID(CPF3777 CPF9999 +
2800 CPF0000)
2900 QSYS/DLYJOB DLY(300)/*WAIT 5 MINS+
3000 BEFORE RUNNING RECLAIM STORAGE*/
3100 RCLSTG
3200
3300 PWRDWNSYS OPTION(*IMMED) RESTART +
3400 (*YES)
3500 ENDPGM
================================== MORE INFORMATION ON THIS TOPIC ==================================
The Best Web Links: Tips, tutorials and more.
Ask your systems management questions--or help out your peers by answering them--in our live discussion forums.
Read this Search400.com Featured Topic: Managing your iSeries.
This was first published in April 2003