User exit

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

A user exit is a subroutine invoked by a software package for a predefined event in the execution of the package. Clients of the package can substitute their own subroutines in place of the default ones provided by the package vendor to provide customized functionality.

The earliest use of this term involved operating systems to let customized code temporarily take control when a pre-designated event occurred.[1][2]

A more typical use is replacing the user exits provided by a sort/merge package,[3][4][5] whereby the user program provides its own subroutines for comparing records. The procedures provided by the user take the place of the default routines (usually stubs that do nothing but return to their caller) provided by the package vendor.

Procedures provided as user exits are typically compiled into a static library and linked directly with the package to produce an executable program. Another approach employs dynamic libraries to accomplish the same thing. Finally, user exits may be external programs executed at specific points in the execution of a host package.[6]


Historically, this term is commonly used in IBM mainframe vernacular.[1][2]

  • Title: z/OS V1R10 DFSMS Installation Exits Document Number: SC26-7396-11
  • Title: z/OS V1R10.0 JES2 Installation Exits Document Number: SA22-7534-10
  • Title: z/OS V1R10.0 MVS Installation Exits Document Number: SA22-7593-14


If the user site specific code is substituted for the software vendor provided default exit it must interface to the software package using the defined parameters as documented for the default exit. User exits are important because while they enable site specific customization they isolate such installation specific customization to defined and supported points enabling the site to upgrade to follow-on releases of the software package without adverse impact to preexisting customized functionality. Some references to IBM user exit manuals are given below. Other vendors such as SAP, Oracle, IFS, HP, Macro4, Compuware, CA all employ user exits in some of their software products.


In SAP, A 'COMMIT WORK' must never be used inside a User Exit, as it may affect the program processing. Furthermore, error messages may not be issued from inside an exit, as they halt the processing of the code that follows the message.


Some applications that provide user exits:

See also[edit]


  1. ^ a b IBM term: OS/MFT, MVT "OS User Exits". Computerworld. April 11, 1977. p. 25. ... so that execution ... under OS/MFT or MVT. ... ease of use for applications with ... user exits
  2. ^ a b "Platform Server for z/OS Installation and Operations Guide" (PDF). Using MFT Platform Server Exits describes the User Exits that ...
  3. ^ "COBOL E15 user exit: passing or changing records for sort". If both E15 and E35 user exits are used ... SORTIN DD statement
  4. ^ "Sorting Using the User Exit". (SAP Documentation).
  5. ^ "Unicenter CA-Sort for VSE" (PDF). If Unicenter CA-Sort overlays the user exit storage with ...
  6. ^ "Did You Say CMVC?". Retrieved 2013-07-22.