Constructing an exit program

The tablesONLINE/CICS distribution tape in the education dataset includes a sample user exit program called EXITPGMC and two copybooks called EXITPARM and EXITWS. These are a good starting point for developing your own exit programs. Different versions of the exit programs with some detail removed and comments added are listed in Sample exit program.

The recommended control structure of an exit program includes the following sections:

  • Initialization of system variables
  • Initialization of user variables
  • Test for operational integrity (defined below)
  • Multi-way branch on EXIT-INDICATORS
  • User code for each branch where action is required
  • Exit for INVALID CALL
  • NORMAL EXIT, with or without message to user.