Power Down System Exit Programs


  Required Parameters: None

  Exit Point Name: QIBM_QWC_PWRDWNSYS  

  Exit Point Format Name: PWRD0100


  Required Parameter Group:


  QSYSINC Member Name: EWCPWRD

  Exit Point Name: QIBM_QWC_PWRDWNSYS

  Exit Point Format Name: PWRD0200

For format PWRD0100, the Power Down System exit program is called when the Power Down System (PWRDWNSYS) or End System (ENDSYS) command is used. There are no input or output parameters for this format. See PWRD0100 Format Usage Notes for more information.

For format PWRD0200, the Power Down System exit programs are called only when the Power Down System (PWRDWNSYS) command is used. See Format PWRD0200 Required Parameter Group for parameter information or PWRD0200 Format Usage Notes for usage information.


Authorities and Locks


Format PWRD0100 Required Parameter

None.


Format PWRD0200 Required Parameter Group

Exit information
INPUT/OUTPUT CHAR(*)

The exit information used to communicate with the exit program.

Format of the exit information.
INPUT; CHAR(8)

The format of the exit program information. The following formats may be passed to the exit program:


Action
INPUT; CHAR(1)

The type of exit program call being made. The following actions may be requested:


Delay time
INPUT; BINARY(4)

The time specified for the delay when jobs are ended. This value represents the values passed in for the How to end (OPTION) and Controlled end delay time (DELAY) parameters on the Power Down System (PWRDWNSYS) command. The possible values are:


PDPF0100 Format

The following table describes the information that is located in the Exit information parameter for the PDPF0100 format. For detailed descriptions of the fields, see Field Descriptions.



Field Descriptions

Exit information length The length of the exit information. This is set to 12.

Status flag A value that should be set by each exit program to indicate whether a powered down state can be reached or not. The possible values are as follows:

Wait time The number of seconds that the system should wait for the exit program to complete the Execute action request. The exit programs can set this to a value between 1 and 3600 seconds. An attempt is made to run each exit program asynchronously via a batch job (asynchronous batch job method). If the batch job method fails for some reason, such as due to being in restricted state, or the subsystem is ending controlled, then another attempt will be made to execute the exit program synchronously via a direct call (synchronous direct call method). As you can see, there could be a mixture of asynchronous and synchronous methods used to run all the exit programs for the power down. Thus, both method's considerations described below must be accounted for when setting this value.

Both method's considerations are met if the sum of all the Wait times returned by the exit programs are less than 3600 seconds and if all exit programs finish Execute action processing in less time than their specified Wait time.

Asynchronous batch job method considerations:

For the Execute action processing, each exit program will be run in a separate job to allow multiple exit programs to be run at the same time. When setting the Wait time, the following needs to be considered:

Synchronous direct call method considerations:

For the Execute action processing, each exit program will be run sequentially in the same job where the PWRDWNSYS command was invoked. Each exit program will be called one after the other, but only after the prior exit program completes (serial) and only if there is time left to process. When setting the Wait time, the following needs to be considered:



PDPF0200 Format

The following table describes the information that is located in the Exit information parameter for the PDPF0200 format. For detailed descriptions of the fields, see Field Descriptions.



Field Descriptions

Execute wait time The number of seconds that the system will wait for this exit program to complete the Execute action request. This value is passed into the exit program as input and is essentially the same Wait time value that was determined during the Check action request. For the asynchronous method, this value will be set to the maximum wait time determined during the Check action request (value passed into each exit program will be the same). For synchronous method, this value will be set to the lesser of the Wait time returned by the exit program and the time left to process out of a maximum of 3600 seconds (value passed into each exit program may vary). This value does not apply to Cancel action requests.

Exit information length The length of the exit information. This is set to 8.


PWRD0100 Format Usage Notes

When a user issues the PWRDWNSYS or ENDSYS command, the operating system calls the user-written exit program that was added through the registration facility. The user-written exit program is not called for the following:

This exit point supports one exit program. For information about adding an exit program to an exit point, see Registration Facility APIs.

The Power Down System exit point ignores any return codes or error messages that are sent from the exit program.

It is recommended that the Power Down System exit program exist in a library in the system auxiliary storage pool (ASP) or in a basic user ASP. It might not be found if it exists in a library in an independent ASP.

PWRD0200 Format Usage Notes

When a user issues the PWRDWNSYS command, the operating system calls the user-written exit programs that were added to the exit point through the registration facility. The user-written exit programs are not called for the following:

Unlike the exit program associated with format PWRD0100, the exit programs associated with PWRD0200 will be called if the system is powered down immediately or in a controlled manner from restricted state.

This exit point supports more than one exit program (no maximum). For information about adding an exit program to an exit point, see Registration Facility APIs.

If there are exit programs specified for both formats (PWRD0100 and PWRD0200) then both format exit program(s) will be called. This can occur for a normal controlled or immediate power down. When this occurs, the PWRD0200 exit programs will be called first followed by the PWRD0100 exit program.

Format PWRD0200 provides a method for the system to determine if a powered down state can be reached. The Action field will have values which will be used to determine what the exit program should do. Each exit program will be called multiple times from the PWRDWNSYS command processing program. Each exit program will be called first with a Check action request to determine if the powered down state can be safely reached and how much time might be required. If an exit program determines that a powered down state cannot be reached at this time (0 Status flag is returned), or if the PWRDWNSYS command is canceled during this Check processing, or if a confirmation panel is displayed after this Check processing and the user elects to not continue the power down, then all prior exit programs that have been called with a Check action request will be called again with a Cancel action request. Each exit program should reset any preliminary actions it may have made.

If all exit programs return a Yes (1 Status flag is returned) during the Check action phase, then each exit program will be called again with an Execute action. An Execute action will be used to instruct the exit program to perform it's pre powered down state work. These jobs will run under the user profile who issued the PWRDWNSYS command. Once the exit program is called with an Execute action, it will either be allowed to complete it's task or it will be terminated if the calculated Wait time is exceeded. Note that once the PWRDWNSYS command reaches the Execute action phase, the command can no longer be canceled.

If the PWRDWNSYS command is run again while the exit programs are processing the Execute action, then the exit programs will have to handle this situation where the Execute action processing may have already occurred and is currently being run in another job. The exit programs will also have to handle any necessary serialization.

Errors detected by the PWRDWNSYS command processing program (unable to call exit program, invalid status flag, and so on) will be treated as if a powered down state can be reached (same as status flag value of 1 being returned).

It is recommended that the Power Down System exit programs exist in a library in the system auxiliary storage pool (ASP number 1) or in a basic user ASP (ASP numbers 2-32). It might not be found if it exists in a library in an independent ASP.


Exit program introduced: V4R2

[ Back to top | Work Management APIs | APIs by category ]