Register Activation Group Exit Procedure (CEE4RAGE2) API


  Required Parameter:

1 procedure Input RAGE_ENTRY2

  Omissible Parameter:

2 fc Output FEEDBACK

  Service Program Name: QLEAWI

  Default Public Authority: *USE

  Threadsafe: Yes

The Register Activation Group Exit Procedure (CEE4RAGE2) API is used to register procedures that are called when an activation group ends. Activation group exit procedures, registered by CEE4RAGE2, are called after HLL user exit procedures, but before any system level activation group resource clean up takes place. The procedures are called in the reverse order of their registration. If a procedure fails, subsequent procedures will not be called.

There is no practical limit to the number of procedures that can be registered. If the same procedure is registered multiple times, it is called multiple times.

Note: This API cannot be called from code running in the default activation group.

Note: The CEE4RAGE2 API and the Register Activation Group Exit Procedure (CEE4RAGE) API perform the same function. The CEE4RAGE2 API takes as its first parameter a procedure that takes a 64 bit activation group mark as a parameter. The CEE4RAGE API takes as its first parameter a procedure that takes a 32 bit activation group mark as a parameter.


Authorities and Locks

None.


Required Parameter

procedure (input)
An entry variable or constant for the procedure that is to be called at activation group termination.

Omissible Parameter

fc (output)
A 12-byte feedback code.

Feedback Codes and Conditions

CEE0000 The API completed successfully
Severity: 00  
CEE0257 The procedure provided for &1 is not valid
Severity: 30  
CEE3101 &1 cannot be called in the default activation group
Severity: 30  
CEE3103 Cannot allocate storage in &1
Severity: 30  
CEE3111 &1 cannot be called at this time
Severity: 30  
CEE9902 Unexpected user error occurred in &1
Severity: 30  

Usage Notes


Interface to the Activation Group Exit Procedure

An activation group exit procedure is called when the activation group is ended. The procedure is coded as activation_group_exit with the following parameters.



  Required Parameter Group:

1 ag_mark Input UINT8
2 reason Input UINT4
3 result_code I/O UINT4
4 user_rc I/O UINT4

Authorities and Locks

None.


Required Parameter Group

ag_mark (input)
The activation group mark that uniquely identifies the activation group within the job.
 
reason (input)
The reason for the activation group being ended. See Common Reason Codes for Ending Activation Groups and Call Stack Entries for a description of the reason codes.
 
result_code (I/O)
The value passed as input is the action to be taken as specified by a previous exit procedure. The value passed to the first exit procedure is 0. The output value can specify an action to be taken. If the result code does not match any of the following actions, the output value is ignored and the previous action remains unchanged.
No action
0 Do not change the action.
Recover
10 Do not perform any pending error requests. This is used if a previous exit procedure specified a result code of 20 and a subsequent procedure recovers from the error. The message CEE9901, indicating an application error, is not sent.
Failure
20 Send message CEE9901 to the caller of the control boundary after the remaining exit procedures are called.
21 Send message CEE9901 to the caller of the control boundary. The remaining exit procedures registered by the CEE4RAGE API are not called. This is used if an unrecoverable error occurs in the exit procedure requesting this action.

Note: The application error message CEE9901 is sent after the activation group resources of the system are taken down and the activation group has ended.

 
user_rc (I/O)
The value passed as input is the user_rc returned as output from the previous exit procedure. The value passed to the first exit procedure is 0.

Common Reason Codes for Ending Activation Groups and Call Stack Entries.

Bit Description
Bits 0 Reserved
Bits 1 Call stack entry is canceled because an exception message was sent.
Bits 2-15 Reserved
Bit 16 0 - normal end 1 - abnormal end
Bit 17 Activation Group is ending.
Bit 18 Initiated by the Reclaim Activation Group (RCLACTGRP) command.
Bit 19 Initiated as a result of the job ending.
Bit 20 Initiated by an exit verb, for example exit() in C, or the CEETREC API.
Bit 21 Initiated by an unhandled function check.
Bit 22 Call stack entry canceled because of an out-of-scope jump, for example longjmp() in C.
Bits 23-31 Reserved (0)


API introduced: V5R3
Top | ILE CEE APIs | APIs by category