Suspend System Exit Programs
Required Parameter Group:
1 | Exit information | Input/Output | Char(*) |
2 | Format of exit information | Input | Char(8) |
3 | Phase | Input | Char(1) |
Exit Point Name: QIBM_QWC_SUSPEND
Exit Point Format Name: SSPS0100
The Suspend System exit program is called before the system will become temporarily unavailable because the partition is being migrated to another machine or the partition is being hibernated. See Format SSPS0100 Required Parameter Group for parameter information or SSPS0100 Format Usage Notes for usage information.
Authorities and Locks
- A user must have all object (*ALLOBJ) and security administrator (*SECADM) special authorities to add or remove exit programs to/from an exit point.
Format SSPS0100 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:
BMGF0100 Before migration format if the Phase parameter specifies a Check request. For details, see BMGF0100 Format. BMGF0200 Before migration format if the Phase parameter specifies a Prepare or Cancel request. For details, see BMGF0200 Format.
- Phase
- INPUT; CHAR(1)
The type of exit program call being made. The exit program can be called during each of the following phases:
1 Check The exit program should determine if the system can be suspended at this time in order to migrate to another machine or hibernate. The exit program should set the Status flag and Wait time values appropriately. 2 Prepare The exit program should prepare for the system to migrate to another machine or hibernate. 3 Cancel The migration or hibernation has been canceled. The exit program should reset any actions it may have taken while handling a previous action request.
BMGF0100 Format
The following table describes the information that is located in the Exit information parameter for the BMGF0100 format. For detailed descriptions of the fields, see Field Descriptions.
Offset | Type | Field | |
---|---|---|---|
Dec | Hex | ||
0 | 0 | BINARY(4) | Exit information length |
4 | 4 | BINARY(4) | Status flag |
8 | 8 | BINARY(4) | Wait time |
12 | C | BINARY(4) | Action |
Field Descriptions
Action The anticipated suspend action. The possible values are as follows:
0 | The partition will be hibernated. |
1 | The partition will be migrated to a different machine. |
Exit information length The length of the exit information. This is set to 16.
Status flag A value that should be set by each exit program to indicate whether the system can be suspended at this time or not. The possible values are as follows:
0 | No, the system cannot be suspended at this time. The exit program should set this value if it determines that the migration or hibernation should not be performed. |
1 | Yes, the system can be suspended to perform a migration or hibernation. |
Wait time The number of seconds that the system should wait for the exit program to complete the Prepare phase request. The exit programs can set this to a value between 1 and 900 seconds during the Check phase. During the Prepare phase each exit program is run in a separate batch job. The Prepare phase will be allowed to run for the maximum value returned by an exit program during the Check phase.
If an exit program does not complete within the wait time the migration or hibernation will continue. If no wait is specified by an exit program the maximum wait time (900 seconds) is used.
BMGF0200 Format
The following table describes the information that is located in the Exit information parameter for the BMGF0200 format. For detailed descriptions of the fields, see Field Descriptions.
Offset | Type | Field | |
---|---|---|---|
Dec | Hex | ||
0 | 0 | BINARY(4) | Exit information length |
4 | 4 | BINARY(4) | Prepare time allowed |
8 | 8 | BINARY(4) | Action |
Field Descriptions
Action The anticipated suspend action. The possible values are as follows:
0 | The partition will be hibernated. |
1 | The partition will be migrated to a different machine. |
Exit information length The length of the exit information. This is set to 12.
Prepare time allowed The number of seconds that the system will wait for this exit program to complete the Prepare phase request before the migration or hibernation starts. This value is the maximum that was specified by an exit program during the Check phase. This value does not apply to Cancel phase requests.
SSPS0100 Format Usage Notes
When a migration or hibernation is requested, the operating system calls the user-written exit programs that were added through the registration facility. The exit programs are called for each phase that occurs. The first phase is the Check phase. The exit programs can allow or prevent the migration or hibernation during this phase. If the exit programs do not prevent the suspend, then the Prepare phase occurs. The exit programs can take any actions necessary to prepare for the system to migrate or hibernate. If the migration or hibernation is canceled or fails, then a Cancel phase occurs. Each exit program is called to inform it that the migration or hibernation has been canceled.
The user-written exit program is not called for the following:
- If the system is already in restricted state.
- If the system is powered down.
- If the QSYSWRK subsystem is not active.
This exit point supports more than one exit program. For information about adding an exit program to an exit point, see Registration Facility APIs.
The job(s) are submitted to run in the QSYSWRK subsystem (using the QSYSJOBD job description) under the QPGMR user profile. No other action is taken if the job does not run.
The Suspend System exit point ignores any return codes or error messages that are sent from the exit program.
It is recommended that the Suspend System exit programs exist in a library in the system ASP or in a basic user ASP. The program will not be found if it exists in a library in an independent ASP.
The Resume System exit point can be used to add exit programs that will be called when the system is resumed after the migration or hibernation completes.
Exit program introduced: V7R1
Top | Work Management APIs | APIs by category |