Calling from exit modules

To call COBOL programs or library routines within your exit modules, use standard COBOL linkage. You need to be aware of the register conventions in order to trace the call chain correctly.

About this task

When a call is made to a program or to a routine in an exit module, the registers are set up as follows:

R1
Points to the parameter list passed to the called program or library routine
R13
Points to the register save area provided by the calling program or routine
R14
Holds the return address of the calling program or routine
R15
Holds the address of the called program or routine

Exit modules must have RMODE attribute 24 and AMODE attribute ANY.

Related concepts  
Storage and its addressability