1 | Return information | Input/Output | Char(*) |
2 | Format of return information | Input | Char(8) |
3 | Action | Input | Char(1) |
4 | Delay time | Input | Binary(4) |
The Pre-restricted State Exit Programs (EWCPRSEP) will provide a method for the system to determine if a restricted state can be reached. The Action field will have values which will be used to determine what the exit program should do. This exit program will be called from the ENDSYS or ENDSBS *ALL programs. A Check action will be used to determine if the restricted state can be safely reached and how much time might be required. An Execute action will be used to instruct the exit program to perform its pre-restricted state work. The Execute action will be run in a separate job to allow multiple exit programs to be run at the same time.
The return information that receives the information requested.
The format of the exit program information to be returned. The following formats may be passed to the exit program.:
PRSE0100 | Pre restricted state check. For details, see PRSE0100. |
PRSE0200 | Pre restricted state execute or cancel. For details, see PRSE0200. |
The type of exit program call being made. The following actions may be requested:
1 Check | The exit program should determine if a restricted state can be reached. |
2 Execute | The exit program should start the process of entering a pre restricted state. |
3 Cancel | Another exit program is not able to enter a restricted state at this time. The exit program should reset any preliminary actions it may have made. |
The time specified for the delay when jobs are ended. The possible values are:
-1 | The jobs are ended in an immediate manner (*IMMED). |
-2 | *NOLIMIT is specified for a controlled end. |
delay time | The delay time entered on the ENDSYS or ENDSBS command for a controlled end. This value can range from 0 to 99999 seconds. |
The following table describes the information that is located in the return information for the PRSE0100 format. For detailed descriptions of the fields, see Field Descriptions.
Offset | Type | Field | |
---|---|---|---|
Dec | Hex | ||
0 | 0 | BINARY(4) | Return information length |
4 | 4 | BINARY(4) | Status flag |
8 | 8 | BINARY(4) | Wait time |
Return information length The length of the returned information. This must be set to 12.
Status flag A value returned to the exit point to indicate whether a restricted state can be reached. The possible returned values are as follows:
0 | No, a restricted state can not be reached at this time. |
1 | Yes, a restricted state can be reached. |
Wait time The number of seconds that will be needed to reach
a preliminary restricted state. Note a maximum value of 3600 seconds (1 hour)
is used to achieve a preliminary restricted state.
Any jobs that have not reached that state by the
maximum time allowed will be terminated and the system will enter a restricted state.
The following table describes the information that is returned in the receiver variable for the PRSE0200 format. For detailed descriptions of the fields, see Field Descriptions.
Offset | Type | Field | |
---|---|---|---|
Dec | Hex | ||
0 | 0 | BINARY(4) | Return information length |
Return information length The length of the returned information. This must be set to 4.
The exit program will be called with a cancel action if another exit program returns a zero status value. Once the exit program is called with an execute action it will either be allowed to complete its task or it will be terminated if the wait time is exceeded. If the ENDSYS or ENDSBS *ALL command is canceled at this point, the program will not be terminated. If the command is run again, then the exit program will have to handle this situation where the execute task may have already occurred or is currently being run in another job. The exit point program will also have to be able to handle any race conditions that may occur if more than one command is executed.
The exit program will not be called if an ENDSYS is called and the system is using auxiliary power.
Errors detected by the exit point (unable to call exit program, invalid status flag, and so on) will be treated as if a status flag value of 1 was returned.
Top | Work Management APIs | APIs by category |