User exit routine overview
DFSORT can pass program control to your own routines at points in the executable code called user exits. Your user exit routines can perform a variety of functions including deleting, inserting, altering, and summarizing records.
If you need to perform these tasks, you should be aware that DFSORT already provides extensive facilities for working with your data in the various DFSORT program control statements. See the discussions of the INCLUDE, OMIT, INREC, OUTFIL, OUTREC, and SUM program control statements in Using DFSORT program control statements. You might decide that using a program control statement to work with your records is more appropriate to your needs.
- Pass and accept the address into general register 1 of a:
- Record
- Full word of zeros
- Parameter list.
- Pass a return code in register 15.
You can easily activate user exit routines at run-time with the MODS program control statement (see MODS control statement). Alternatively, under certain circumstances you can also activate a user exit routine by passing the address of your exit routine in the invocation parameter list. See Invoking DFSORT from a program for details.
- The MODS statement, explained in MODS control statement
- The E15=COB and E35=COB PARM options of the EXEC statement, explained in Specifying EXEC/DFSPARM PARM options
- The COBEXIT option of the OPTION statement, explained in OPTION control statement
- The EXITCK option of the OPTION statement, explained in OPTION control statement.
Certain user exit routines can be written in COBOL, using a special interface. If you write your exit routines in PL/I, you must use the PL/I subroutine facilities.
You might need to reserve space to be used by your exits. See Use main storage efficiently for more information about storage.