Linkage examples
When calling your user exit, DFSORT places the return address in general register 14 and your routine's entry point address in general register 15. DFSORT has already placed the register's save area address in general register 13. DFSORT then makes a branch to your routine.
Your routine for the E15 user exit might incorporate the following
assembler instructions:
ENTRY E15
.
.
E15 SAVE (5,9)
.
.
RETURN (5,9)
This coding saves and restores the contents of general registers
5 through 9. The macro instructions are expanded into the following
assembler language code:
ENTRY E15
.
.
E15 STM 5,9,40(13)
.
.
LM 5,9,40(13)
BR 14
If multiple actions are available at a user exit, your routine
sets a return code in general register 15 to inform DFSORT of the
action it is to take. The following macro instruction can be used
to return to DFSORT with a return code of 12 in register 15:
RETURN RC=12
A full explanation of linkage conventions and the macro instructions discussed in this section is in z/OS MVS Programming: Assembler Services Guide.