Exit Program for Tailoring Power Off

The Power-Off exit program (QEZPWROFFP) is shipped with the system and stored in the QSYS library. This exit program powers off the system according to the power on and off schedule by running the Power Down System command PWRDWNSYS OPTION(*IMMED). (Use the Change Power Schedule Entry (CHGPWRSCDE) command or the Change Power Schedule (CHGPWRSCD) command to set the power on and off schedule.)

You can tailor this program to change how you want the system powered off. For example, you could change the program so that the system would not power off immediately.

To change this program:

  1. Type RTVCLSRC (the Retrieve CL Source command) on any command line and press F4 (Prompt). Type the following values for the prompts:

    Program QEZPWROFFP
    Library QSYS
    Source file Name of source file
    Library Name of library

    Press the Enter key.

  2. Change the source to tailor the program. For example, you may want to specify RESTART(*YES) for the PWRDWNSYS command to cause the system to power on (IPL) when the power down is complete.

  3. When you are finished changing the program, use the Create CL Program (CRTCLPGM) command and fill in the fields as you did when you retrieved the program. The program you create must be named QEZPWROFFP.

  4. To use the new program, put the new program in a library before the QSYS library in the system part of the library list as specified in system value QSYSLIBL.

Notes:

  1. Remember that this program controls the scheduled powering off of the system. If you remove the Power Down System (PWRDWNSYS) command, the system does not automatically power down on schedule. If you change the OPTION parameter on the PWRDWNSYS command to *CNTRLD, the system may wait the amount of time specified by the DELAY parameter before it powers off. If the DELAY parameter is changed to *NOLIMIT, the system may never power off.

  2. If your next scheduled power-on time is fairly close to the scheduled power-off time, and you have long running commands or calls to programs ahead of the PWRDWNSYS command, your system may not have powered off by the time it is scheduled to power on again. Before the system is powered down, check the time of the next scheduled power up using the Retrieve Power Schedule Entry (RTVPWRSCDE) command. You should also use the Change Power Schedule Entry (CHGPWRSCDE) command to reset the system value. If it is within 1/2 hour, do not power off the system; otherwise, your system may not power on again, and you will need to do a manual IPL.

  3. This program will not get called when the current time is less than 30 minutes before the next scheduled power-on time.


Exit program introduced: V2R1

[ Back to top | Operational Assistant APIs | APIs by category ]