Pre-restricted State Exit Programs (EWCPRSEP)
Required Parameter Group:
|2||Format of return information||Input||Char(8)|
QSYSINC Member Name: EWCPRSEP
Exit Point Name: QIBM_QWC_PRERESTRICT
Exit Point Format Name: PRER0100
Exit Point Formats:PRSE0100,PRSE0200
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.
Authorities and Locks
- User Profile Authority
- *ALLOBJ and *SECADM special authorities are required to add and remove exit programs to the QIBM_QWC_PRERESTRICT exit point.
Required Parameter Group
- Return information
- INPUT/OUTPUT; CHAR(*)
The return information that receives the information requested.
- Format of the return information.
- INPUT; CHAR(8)
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.
- INPUT; CHAR(1)
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.
- Delay time.
- INPUT; BINARY(4)
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.
|0||0||BINARY(4)||Return information length|
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.
|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.
Exit program introduced: V5R3