z/OS DFSMSdfp Utilities
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Returning from an Exit Routine

z/OS DFSMSdfp Utilities
SC23-6864-00

An exit routine returns control to the utility program by means of the RETURN macro instruction in the exit routine. Registers 1 through 14 must be restored before control is returned to the utility program.

The format of the RETURN macro instruction is:

Label Statement Parameters

[label]

RETURN

[(r,r)]
[,RC={
n|(15)}]

where:
(r,r)
specifies the range of registers, from 0 to 15, to be reloaded by the utility program from the register save area. For example, (14,12) indicates that all registers except register 13 are to be restored. If this parameter is omitted, the registers are considered properly restored by the exit routine.
RC={n|(15)}
specifies a decimal return code in register 15. If RC is omitted, register 15 is loaded as specified by (r,r).
n
specifies a return code to be placed in register 15.
(15)
specifies that general register 15 already contains a valid return code.
A user label processing routine must return a code in register 15 as shown in Table 1 unless:
  • The buffer address was set to zero before entry to the label processing routine. In this case, the system resumes normal processing regardless of the return code.
  • The user label processing routine was entered after an unrecoverable output error occurred. In this case the system tries to resume normal processing.

Table 1 shows the return codes that can be issued to utility programs by user exit routines.

Table 1. Return codes that must be issued by user exit routines
Type of Exit Return Code Action
Input Header or Trailer Label (except for IEBUPDTE when UPDATE=INPLACE) 0 The system resumes normal processing. If there are more labels in the label group, they are ignored.
4 The next user label is read into the label buffer area and control is returned to the user's routine. If there are no more labels, normal processing is resumed.
16 The utility program is ended on request of the user routine.
Input Header or Trailer Label for IEBUPDTE UPDATE=INPLACE 0 The system resumes normal processing; any additional user labels are ignored.
4 The system does not write the label. The next user label is read into the label buffer area and control is returned to the user exit routine. If there are no more user labels, the system resumes normal processing.
8 The system writes the user labels from the label buffer area and resumes normal processing.
12 The system writes the user label from the label buffer area, then reads the next input label into the label buffer area and returns control to the label processing routine. If there are no more user labels, the system resumes normal processing.
Output Header or Trailer Label 0 The system resumes normal processing. No label is written from the label buffer area.
4 The user label is written from the label buffer area. The system then resumes normal processing.
8 The user label is written from the label buffer area. If fewer than eight labels have been created, the user's routine again receives control so that it can create another user label. If eight labels have been created, the system resumes normal processing.
16 The utility program is ended on request of the user routine.
Totaling Exits 0 Processing continues, but no further user exits are taken.
4 Normal operation continues.
8 Processing ceases, except for EOD processing on output data set (user label processing).
16 Utility program is stopped.
ERROR 0 Record is not placed in the error data set. Processing continues with the next record.
4 Record is placed in the error data set (SYSUT3).
8 Record is not placed in error data set but is processed as a valid record (sent to OUTREC and SYSUT2 if specified).
16 Utility program is ended.
OUTREC (IEBPTPCH) 4 Record is not placed in normal output data set.
12 or 16 Utility program is ended.
Any other number Record is placed in normal output data set (SYSUT2).
All other exits 0-11 (Set to next multiple of four) Return code is compared to highest previous return code; the higher is saved and the other discarded. At the normal end of job, the highest return code is passed to the calling processor.
12 or 16 Utility program is stopped and this return code is passed to the calling processor.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014