Once a power-handling program has been created, you can test it by creating a simple CL program that uses the Send Program Message (SNDPGMMSG) command and the Delay Job (DLYJOB) command. Set the DLY parameter value on the DLYJOB command to meet your testing needs.
SEQNBR*...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7.... 1.00 PGM 2.00 DLYJOB DLY(120) /* Wait for 2 minutes. */ 3.00 SNDPGMMSG MSGID(CPF1816) MSGF(QCPFMSG) + 4.00 TOMSGQ(UPSLIB/UPSMSGQ) /* Power failure 5.00 message. */ 6.00 DLYJOB DLY(5) /* Wait for 5 seconds. */ 7.00 SNDPGMMSG MSGID(CPF1817) MSGF(QCPFMSG) + 8.00 TOMSGQ(UPSLIB/UPSMSGQ) /* Power restored 9.00 message. */ 10.00 ENDPGM