END User Exit

The END user exit is given control when the product receives a request to terminate. Control passes to the exit after either an END command or a SIGNAL SHUTDOWN request.
vmx32besp
The END user exit is given control when the product receives a request to terminate. Control passes to the exit after either an END command or a SIGNAL SHUTDOWN request.
If the product has a problem while processing the END user exit, it gives an error. Then the product starts end processing as if the user exit is not in place.
{END | SIGNAL} process-owner requesting-
user
secs-to-expire force-option
Parameters
  • END
    Product end is initiated through the END command.
  • SIGNAL
    Product end is initiated through Signal Shutdown.
  • process-owner
          
The user ID associated with the process to execute the product end. If the call is for END, this user ID is the same as the requesting user. If the call is for SIGNAL, this user ID is the user ID of the product service virtual machine.
  • requesting-user
          The user that initiated the END or SIGNAL SHUTDOWN request
  • secs-to-expire
    For a call to the exit due to a Signal Shutdown event, the value is the number of seconds until the shutdown signal expires. This value is updated if repeated calls to the exit are needed. When the exit is called during the processing of the END command, the time parameter is 0.
    Note:
    Code the END user exit to allow both for the orderly ending of the product and for the end to occur within the specified expiration time for the SIGNAL event call. 
  • force-option
    Indicates whether the FORCE operand was used for the product END command. If FORCE was used, the value of this field is FORCE. If FORCE was not used, or if a signal shutdown request ended the product, the value is NOFORCE.
Return Codes
The following return codes are accepted on return from the user exit.
Return Code
Meaning
0
Accept the request and end the product.
4
Do not end the product yet. Call the END user exit again in
n
seconds. The number of seconds to be used as the wait time is returned in the stack from the exit. The wait time is specified in seconds and must be in the range between 1-32767. If no time is returned from the exit, or if the wait time is invalid, the wait time until the next call to the user exit is 5 seconds.
Note:
If the expiration time for a signal shutdown is less than the wait time stacked with return code 4, the product does not call the exit again. Instead, the product starts end processing immediately.
8
Reject the request. Do not end the product.
Depending on how it is coded, the END user exit can delay the completion of the END command. To avoid such delays, use SMSG VMSECURE END when you do not require a completion code. For best results, do not code the END user exit to use return code 4 for processing the END command. Use of return code 4 can lead to users waiting for the VMSECURE END command to respond.
Use in SSI Cluster
In an SSI cluster, a SIGNAL SHUTDOWN request services only the local system. Issue a signal shutdown for the product on all SSI members that you want the product ended on.