PWRDWNSYS (Power Down System)
PWRDWNSYS Command syntax diagram
Purpose
The Power Down System (PWRDWNSYS) command prepares the system for ending and then starts the power-down sequence. All active subsystems are notified that the system is being powered down; no new jobs or routing steps can be started by any subsystem. For example, jobs that are on a job queue as a result of a Transfer Job (TFRJOB) command are not allowed to complete. During the subsequent initial program load (IPL), they are removed from the job queue and their job logs are produced. When the system is powered down with the *CNTRLD option, a vary off of configuration objects is initiated, but may not complete before the power down completes. When the system is powered down with the *IMMED option, no vary off of configuration objects is performed.
Note: If network server descriptions are configured on the system, all NWSDs should be varied off before the Power Down System command is issued to ensure the integrity of system and user data associated with each network server.
Note: If tape units are installed on the system, all tape reels that are on the devices should be unloaded before the system is powered down. This step ensures the integrity of data on the tapes.
Note: On a partitioned system, powering down the primary partition will cause the other partitions to power down. Ensure the other partitions are ready to be powered down before powering down the primary partition.
Note: If independent auxiliary storage pool (ASP) devices are configured on the system, all independent ASPs should be varied off before the Power Down System command is issued. This allows the work associated with each independent ASP to end in an orderly manner, which helps ensure the consistency of data associated with each independent ASP.
Note: The Power Down System exit point (QIBM_QWC_PWRDWNSYS) can be used to register a program that is called when the PWRDWNSYS command is used. This program can perform clean up functions before the system is powered down.
Restrictions: To run this command, the user must have job control (*JOBCTL) authority. The following restrictions apply:
- You must have *USE authority to the image catalog specified by the IMGCLG parameter and *EXECUTE authority to the QUSRSYS library containing that image catalog.
Optional Parameters
- OPTION
- Specifies whether the system either allows the active subsystem to end processing of active jobs in a controlled manner (which lets the application program perform end processing) or the system ends the jobs immediately. In either case, the system performs certain job-cleanup functions.
*CNTRLD: The subsystem, within the time specified by the DELAY parameter, ends all active jobs in a controlled manner. During that time, programs running in those jobs are allowed to perform job cleanup (end-of-job processing) functions. If an active job could begin to loop or send an inquiry message to QSYSOPR, an appropriate time delay should be specified by using the DELAY parameter.
*IMMED: The subsystem ends all active jobs immediately. This means the programs running in those jobs are not allowed to perform any job cleanup. Thus, a minimum amount of time is required when *IMMED is specified. The amount of time allowed for cleanup when *IMMED is specified is controlled by QPWRDWNLMT, the system value. This option might cause undesirable results if data has been partially updated, and it should be used only after a controlled end has been unsuccessfully attempted.
When OPTION(*IMMED) is specified while the system is operating under auxiliary power, or if the delay time specified in the DELAY parameter ends while the system is under auxiliary power, the system ignores the QPWRDWNLMT system value and starts the power-down sequence without additional job cleanup activity.
- DELAY
- Specifies the number of seconds that the system allows a controlled end of processing operation to be performed by the active subsystems. If the end-of-job cleanup functions are not finished within the specified delay time, any remaining jobs are ended immediately.
3600: The amount of time in which to complete a controlled end of processing is limited to 3600 seconds.
*NOLIMIT: The system does not power down until the last job is complete.
Note: If *NOLIMIT is specified and a batch job begins to loop, the system does not power down. delay-time: Specify the maximum number of seconds in which a controlled end operation can be performed. Valid values range from 1 through 99999 seconds.
- RESTART
- Specifies whether the system ends and powers down, or ends and then restarts in unattended mode.
*NO: The system ends and powers down.
Element 1: Restart after power down
*YES: If the system is on utility power, it undergoes end of system processing (but does not power down) and then does an initial program load (IPL). If the system is on auxiliary power, it powers down and does an automatic IPL when utility power is restored (if the QPWRRSTIPL system value is set to '1'). When the system restarts or an automatic IPL occurs, the IPL proceeds in an unattended mode. In unattended mode, displays such as the IPL options prompt are not shown. More information is in the Work Management book.
Element 2: Restart type
Specifies the point from which the initial program load (IPL) restarts. Specifying *SYS rather than *FULL can reduce the time required to restart the system.
*IPLA: The value specified on the Change IPL Attributes (CHGIPLA) command is used. To determine the current setting for this value, use the Display IPL Attributes (DSPIPLA) command.
*SYS: The operating system is restarted. The hardware will only be restarted when required by the system.
*FULL: All portions of the system, including the hardware, are restarted.
- IPLSRC
- Specifies whether an initial program load (IPL) is started from the A-source, B-source, or D-source of the system. This parameter allows the user to control which Licensed Internal Code (LIC) storage source of the system to use at IPL. Also, the source of the system determines where LIC program temporary fixes (PTFs) are applied. This parameter also allows the system to be upgraded to a new release from an install image on DASD.
Source Considerations:
LIC has three storage areas, known as the A-source, the B-source, and the D-source. The D-source is a tape device or optical device. The A- and B-sources are part of the system memory. Initially, the A- and B-sources are identical, but when Licensed Internal Code fixes (PTFs) are applied temporarily, the temporary fixes are stored only on the B-source. When these fixes become permanent, they are copied from the B-source to the A-source; therefore, the fixes reside on both the A-source and B-source.
The user who wants to send temporary fixes to the B-source must start the system from the A-source, which causes the fixes to be sent to the opposite source, or the B-source.
A user that starts the system from the A-source is running the system from the permanent fixes. A user that starts the system from the B-source is running the system from a combination of temporary and permanent fixes. A user that starts the system from the D-source uses the Licensed Internal Code loaded from the media.
Notes
- It is recommended that the user specify RESTART(*YES), otherwise, the user cannot be assured as to which source the system is actually starting. This precaution can save the user time.
*PANEL: The system is started from the source (A-source, B-source, or D-source) that is currently shown on the operator's display,
A: The system is started from the A-source.
B: The system is started from the B-source.
D: The system is started from the D-source, the install media.
*IMGCLG: The system is started from the image catalog specified with the IMGCLG parameter. RESTART(*YES) must be used when this option is selected.
- IMGCLG
- Specifies the image catalog used when IPLSRC(*IMGCLG) is selected. After the system is powered down, an install using the specified image catalog is performed. See the Work with Image Catalog (WRKIMGCLG) command for more information. RESTART(*YES) must be used when this parameter is specified.
image-catalog-name: Specify the name of the image catalog in library QUSRSYS. >
- ENDSBSOPT
- Specifies the options to take when ending the active subsystems. In general, specifying these options will improve the performance of the PWRDWNSYS command. Each option has certain side effects that you need to analyze before using that option.
This parameter has no effect on jobs that are already in the ending status.
*DFT: The subsystems will end with no special ending options.
- Joblogs will be produced.
- The run priority will not change.
- The timeslice value will not change.
*NOJOBLOG: No joblogs will be created for jobs that are ended due to this command being invoked. This includes subsystem monitor jobs and all user jobs in the subsystem. This option can significantly reduce the amount of time necessary to complete the PWRDWNSYS command. However, if a problem occurs in a job, there will be no joblog to record the problem, which may make problem diagnosis difficult or impossible.
Note: If OPTION(*IMMED) is specified, then no joblogs are produced during PWRDWNSYS regardless of the ENDSBSOPT parameter. However, these joblogs will still be produced on the next IPL of the system unless the *NOJOBLOG option is specified. Therefore, if you specify OPTION(*IMMED) ENDSBSOPT(*NOJOBLOG), the system will not power down more quickly, but the subsequent IPL may be faster. *CHGPTY: The CPU priority of jobs that are ending is changed to a higher value (worse priority). The remaining active jobs on the system may have better performance when *CHGPTY is specified. However, jobs that are ending may take longer to finish. This option is ignored if the system is ending controlled. But if the DELAY time limit expires, this option will take affect immediately.
*CHGTSL: The timeslice of jobs that are ending is changed to a lower value. The remaining active jobs on the system may have better performance when *CHGTSL is specified. However, jobs that are ending may take longer to finish. This option is ignored if the system is ending controlled. But if the DELAY time limit expires, this option will take affect immediately.
- TIMOUTOPT
- Specifies the option to take when the system does not end within the time limit specified by the QPWRDWNLMT system value. If this time limit is exceeded, the subsequent IPL will be abnormal regardless of the value specified for this parameter.
*CONTINUE: The system will ignore the timeout condition and continue powering the system down. If RESTART(*YES) is specified, the system will restart automatically. A minimum of information will be available for service to debug the system.
*MSD: The system will issue a main store dump which can be used by service to debug the system. If the main store dump manager is configured correctly, the system will restart after the dump is finished. See the iSeries Licensed Internal Code Diagnostic Aids - Vol 1 book for more information on main store dump manager.
*SYSREFCDE: The system will display system reference code B900 3F10 and the system will stop.
- CONFIRM
- Specifies whether the request should be confirmed before the system is powered down.
*ENVVAR: The value in environment variable QIBM_PWRDWNSYS_CONFIRM is used to determine whether the request should be confirmed. If the value is set to *INTERACT, *YES, or *NO, the action described below for that value is taken. If the environment variable is not defined or not set to one of these values, then there is no confirmation. System initiated power downs do not use the environment variable.
*INTERACT: A confirmation panel is displayed when the PWRDWNSYS command is issued in an interactive job. There is no confirmation when the PWRDWNSYS command is issued in a non-interactive job.
*YES: A confirmation panel is displayed when the PWRDWNSYS command is issued in an interactive job. An inquiry message is sent to QSYSOPR when the PWRDWNSYS command is issued in a non-interactive job.
*NO: There is no confirmation when the PWRDWNSYS command is issued. >
Examples for PWRDWNSYS
Example 1: Performing An Immediate End
PWRDWNSYS OPTION(*IMMED)This command causes the system to perform an immediate end without allowing any active jobs to perform cleanup routines. Once the system completes its end functions, it starts the power-down sequence.
Example 2: Specifying a Controlled End
SBMJOB JOB(LASTJOB) JOBD(QBATCH) JOBPTY(9) JOBQ(QBATCH) RQSDTA('PWRDWNSYS *CNTRLD 3600')This command submits a low priority batch job that, when run, causes the system to perform a controlled end. The controlled end is allowed one hour (3600 seconds) for completion before any remaining jobs are ended. This method of issuing the PWRDWNSYS command could be used to allow other higher priority jobs on job queue QBATCH (including those that are on the queue as a result of the Transfer Job (TFRJOB) command) to be completed before the PWRDWNSYS command is run. There must be an active subsystem for which the QBATCH job queue is a source of work.
Example 3: Specifying a Controlled End With No Time Limit
PWRDWNSYS OPTION(*CNTRLD) RESTART(*YES)This command causes the system to perform a controlled end with no time limit. When all jobs in the system have completed, the system prepares for ending and starts an IPL.
After PWRDWNSYS OPTION(*CNTRLD) is entered, and before the delay time ends, this command can be overridden by entering PWRDWNSYS OPTION(*IMMED). In this case, the values specified or defaulted for the RESTART parameter on the second command also override the values specified or defaulted for the first command.
Example 4: Changing the IPL Source After Immediate End
PWRDWNSYS OPTION(*IMMED) RESTART(*YES) IPLSRC(A)This command causes the system to end immediately and change the IPL source to A. When the system restarts, it IPLs on the A source.
Example 5: Allowing the operating system to determine the restart point
PWRDWNSYS OPTION(*IMMED) RESTART((*YES *SYS))This command causes the IPL to restart at the point determined by the operating system.
Example 6: Changing the time out option.
PWRDWNSYS OPTION(*IMMED) TIMOUTOPT(*MSD)This command causes the system to end immediately. If the QPWRDWNLMT system value is exceeded, the system will dump the main storage. If the main store dump manager is configured correctly, the system will restart. Otherwise, the B900 3F10 system reference code will be displayed and the system will halt.
Example 7: Installing a new release of the operating system.
PWRDWNSYS RESTART(*YES) IPLSRC(*IMGCLG) IMGCLG(MYCAT1)This command causes the system to end and then start installing a new release of the operating system from the image catalog MYCAT1.
Error messages for PWRDWNSYS
*ESCAPE Messages
- CPF1001
- Wait time expired for system response.
- CPF1036
- System powering down with *CNTRLD option.
- CPF1037
- System powering down with *IMMED option.
- CPF1038
- No authority to use command.
- CPF1091
- Function check occurred in system arbiter.
- CPFBC42
- Verify for image catalog &1 failed.