z/OS JES2 Installation Exits
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Return codes

z/OS JES2 Installation Exits
SA32-0995-00

A return code provides a convenient way for an exit routine to affect the course of following JES2 processing.

The standard return codes are 0 and 4. If 0 is returned by an exit routine that is not the last or the only exit routine associated with its exit, the exit effector calls the next consecutive exit routine. However, a 0 returned by the last or only exit routine associated with its exit directs JES2 to proceed with standard processing. A 4 returned by any exit routine directs JES2 to proceed unconditionally with standard processing; any succeeding exit routines remain uncalled.

Note that a standard return code does not necessarily suggest that an exit routine has opted to take no action. You can write an exit routine to manipulate certain JES2 data areas and then, by generating a standard return code, direct JES2 to continue with normal processing based on this altered data.

The definition of return codes that are greater than 4 is exit-dependent. The specific implementation of return of return codes greater than 4 is documented for each exit under the category, RETURN CODES in each exit's description. A brief indication of the standard processing that results from the return of 0 or 4 is also included for each exit. Note that if you install an optional installation-defined exit, you are responsible for modifying JES2 code, following your exit, to receive and act on any return code greater than 4 generated by your exit routine.

A return code is always a multiple of 4. If your exit routine passes a return code other than 0 or another multiple of 4 to JES2, results are unpredictable. Also, the $EXIT exit-point definition macro has a MAXRC= operand that specifies the exit's maximum acceptable return code. If your exit routine generates a return code that exceeds this specification and the exit was called from the JES2 main task, the exit effector issues the $ERROR macro. If the exit was called from a JES2 subtask, from the user environment, or from the FSS environment, the exit effector issues the ABEND macro.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014