Structure of an exit program

User exit programs can be used to customize tablesONLINE/ISPF for your application by letting you interrupt tablesONLINE/ISPF processing with your own programs.

Note:
Support for these programs is the responsibility of your company.

When a user exit program is called, tablesONLINE/ISPF processing ends and control is given to the exit program. An exit program can be invoked at the table, field, or row level. Your exit program can be called before the table is opened, before the field is edited, or before the row is edited.

The following shows the data areas that are passed between tablesONLINE and the user exit program. This information is also in the copybook, EXITISPF, in the distribution source library.

*-------------------------------------------------------------
* THIS IS A COBOL COPY BOOK FOR USE IN TABLESONLINE/ISPF EXIT
* PROGRAMMING. IT MAPS THE LINKAGE SECTION FOR THESE EXITS
*-------------------------------------------------------------
 01  HOOK-PARAMETER-AREA-1.
     05  HOOK-FIELD                 PIC  X(50).
     05  HOOK-FLD-DEFS              PIC  X(100).
     05  TABLE-COMMAND-AREA.
         10  TB-COMMAND             PIC  X(02).
         10  TB-TABLE               PIC  X(08).
         10  TB-FOUND               PIC  X.
         10  TB-INDIRECT            PIC  X.
         10  FILLER                 PIC  X.
         10  TB-ABEND-OVERRIDE      PIC  X.
         10  TB-ERROR               PIC S9(04) COMP.
         10  TB-COUNT               PIC S9(08) COMP.
         10  TB-LOCK-LATCH          PIC  X(08).
         10  TB-ROW-OVERRIDE-LENGTH PIC S9(08) COMP.
         10  TB-ROW-ACTUAL-LENGTH   PIC S9(08) COMP.
         10  TB-FG-KEY-LENGTH       PIC S9(04) COMP.
         10  TB-FUNCTION-ID         PIC S9(04) COMP.
         10  TB-FUNCTION-AREA       PIC  X(08).
         10  TB-DATE-AREA   REDEFINES  TB-FUNCTION-AREA.
             15  TB-DATE            PIC  X(08).
         10  FILLER                 PIC  X(20).
         10  TB-RETURNED-ABS-GEN-NO PIC S9(04) COMP.
         10  TB-ERROR-SUBCODE       PIC S9(04) COMP.
     05  I-ZUSER                    PIC  X(08).
     05  TABLE-OPEN-SW              PIC  X(01).
     05  ACTION-BYPASS-IND          PIC  X(01).
     05  FIELD-COMMAND-AREA.
         10  FT-COMMAND             PIC  X(02).
         10  FT-TABLE.
             15  FILLER             PIC  X(07).
             15  FT-TABLE-SUFFIX    PIC  X.
         10  FT-FOUND               PIC  X.
         10  FT-INDIRECT            PIC  X.
         10  FILLER                 PIC  X.
         10  FT-ABEND-OVERIDE       PIC  X.
         10  FT-ERROR               PIC S9(04) COMP.
         10  FT-COUNT               PIC S9(08) COMP.
         10  FT-LOCKLATCH           PIC  X(08).
         10  FT-ROW-OVERRIDE-LENGTH PIC S9(08) COMP.
         10  FT-ROW-ACTUAL-LENGTH   PIC S9(08) COMP.
         10  FT-FG-KEY-LENGTH       PIC S9(04) COMP.
         10  FT-FUNCTION-ID         PIC S9(04) COMP.
         10  FT-FUNCTION-AREA       PIC  X(08).
         10  FT-DATE-AREA  REDEFINES  FT-FUNCTION-AREA.
             15  FT-DATE            PIC  9(08).
         10  FILLER                 PIC  X(20).
         10  FT-RETURNED-ABS-GEN-NO PIC S9(04) COMP.
         10  FT-ERROR-SUBCODE       PIC S9(04) COMP.
     05  HOOK-FILLER                PIC  X(171).
     05  I-TYPECHG                  PIC  X(01).
     05  HOOK-POINTER               PIC S9(04) COMP SYNC.
     05  DATA-ARRAY-NEW.
         10  DATA-ENTRY-NEW         OCCURS 1000
                                    PIC  X(50).
 01  HOOK-PARAMETER-AREA-2.
     05  WS-EDIT-ERR                PIC S9(04) COMP SYNC.
     05  HOOK-USER-MESSAGE          PIC  X(60). 

The communication data area for exit programs consists of two sections:

  • HOOK-PARAMETER-AREA-1 passes information from tablesONLINE/ISPF to the user exit program
  • HOOK-PARAMETER-AREA-2 passes error codes and messages from the user exit program to tablesONLINE/ISPF.

The following sub-sections explain the fields of the HOOK-PARAMETER-AREA1 and HOOK-PARAMETER-AREA-2.