DFHUEM (user exit manager)

The user exit manager (DFHUEM) processes EXEC commands that are entered by an application program or the command interpreter, to control user exit activity.

DFHUEM contains three routines, corresponding to the three commands, as follows:
ENABLE
Checks whether a user exit block (EPB) already exists for the exit program specified in the PROGRAM operand.
  • If an EPB is not found and the ENTRY operand is not specified, the exit program is loaded, and the following actions take place:
    1. A new EPB is obtained and added to the chain.
    2. The name and entry address of the exit program are placed in the EPB.
    3. If the GALENGTH operand is specified, a work area is obtained, and its address and length are placed in the EPB. The work area is obtained from 24-bit storage or 31-bit storage, depending on the value specified in the GALOCATION operand. If the GALOCATION operand is not specified, 24-bit storage is used.
    4. If the GAPROGRAM operand is specified, the address of the EPB for the exit program specified in the GAPROGRAM operand is placed in the new EPB, thus allowing exit programs to share a global work area.
  • If the EXIT operand is specified, the exit program link (EPL) chain for the specified exit point is found.
    1. A new EPL is obtained, if necessary, and added to the chain.
    2. The address of the EPB for the exit program specified in the PROGRAM operand is placed in the EPB.
    3. The activation count in the EPB is increased by 1.
    4. If the exit point is not in the AP domain, the domain is notified that the exit point is active.
  • If the START operand is specified, the start flag in the EPB is set on.
DISABLE
Finds the EPB for the exit program specified in the PROGRAM operand.
  • If the STOP or EXITALL operand is specified, the start-flag in the EPB is set off.
  • If the EXIT operand is specified, the EPL chain for the specified exit point is found. The EPL that is pointing to the EPB for the exit program specified in the PROGRAM operand is removed from the chain and the activation count is reduced by 1.
  • If the EXITALL operand is specified:
    1. All EPL chains are scanned.
    2. All EPLs pointing to the EPB for the exit program specified in the PROGRAM operand are removed from its chain.
    3. If the ENTRY operand was not specified when the exit program was enabled, the exit program is deleted.
    4. The EPB is removed from the chain.
    5. If a work area used by the exit program is not still being used by another exit program, it is released.
    6. Any EPB or EPL that is no longer required is moved to a free-chain anchored in the user exit table header (UETH).
  • When EXIT or EXITALL is specified for exit points that are not in the AP domain, the domain is notified when there are no exit programs active.
EXTRACT-EXIT
Finds the EPB for the exit program specified in the PROGRAM operand. The work area’s address and length are extracted from this EPB (or from the EPB that owns the work area) and placed in the user’s fields specified in the GASET and GALENGTH operands.


dfhs3c001081.html | Timestamp icon Last updated: Monday, 5 June 2017