Start of changeRegister Activation Group Exit Procedure Last (CEE4RAGEL) API


  Required Parameter:


  Omissible Parameter:


  Service Program Name: QLEAWI

  Default Public Authority: *USE

  Threadsafe: Yes

The Register Activation Group Exit Procedure Last (CEE4RAGEL) API is used to register procedures that are called when an activation group ends. Activation group exit procedures, registered by CEE4RAGEL, are called after HLL user exit procedures, but before any system level activation group resource clean up takes place. Other APIs that can register activation group exit procedures are CEE4RAGE and CEE4RAGE2. When those APIs are called, the exit procedures are called in the reverse order of their registration. CEE4RAGEL, however, will register the exit procedure so that it is called last, no matter which order the registration took place. The exit procedure that previously would have been called last will now be called just before the exit procedure registered with this API (second to last).

For example, if E1, E2, E3, E4, and E5 are exit procedures registered as follows:

CEE4RAGE2(E1,NULL);
CEE4RAGE2(E2,NULL);
CEE4RAGEL(E3,NULL);
CEE4RAGE2(E4,NULL);
CEE4RAGEL(E5,NULL);

When the activation group ends, the exit procedures will be called in the following order: E4, E2, E1, E3. and E5.

If an exit procedure fails, subsequent exit procedures will not be called. There is no practical limit to the number of exit procedures that can be registered. If the same exit procedure is registered multiple times, it is called multiple times.


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


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:


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
Recover
Failure

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.


End of change

API introduced: V7R1 with PTF

[ Back to top | ILE CEE APIs | APIs by category ]