z/OS DFSORT Application Programming Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


E15 return codes

z/OS DFSORT Application Programming Guide
SC23-6878-00

Your COBOL E15 routine must pass a return code to DFSORT in the RETURN-CODE field, a COBOL special register. Following are the return codes for the E15 user exit:
Return Code
Description
00 (X'00')
No Action
04 (X'04')
Delete Record
08 (X'08')
Do Not Return
12 (X'0C')
Insert Record
16 (X'10')
Terminate DFSORT
20 (X'14')
Alter or Replace Record
0: No Action
If you want DFSORT to retain the record unchanged, return with RETURN-CODE set to 0.
4: Delete Record
If you want DFSORT to delete the record, return with RETURN-CODE set to 4.
8: Do Not Return
DFSORT continues to enter your routine until you return with RETURN-CODE set to 8. After that, the user exit is not used again during the DFSORT application. Unless you are inserting records after the end of the data set, you must set RETURN-CODE to 8 when DFSORT indicates the end of the data set, which it does by entering your routine with the record flags field set to 8.

If your user exit routine passes a return code of 8 to DFSORT when input records still remain to be processed, the remaining records are processed by DFSORT but are not passed to your user exit.

12: Insert Record
If you want DFSORT to add a record before the new record in the input data set:
  • Move the insert record to the return record field
  • For VLR, move the length to the return record length field (Do not include the 4-byte RDW in this length.)
  • Return with RETURN-CODE set to 12.

DFSORT returns to your routine with the same record as before in the new record field, allowing your routine to insert more records or handle the new record.

You can also insert records after the end of the data set. DFSORT keeps returning to your routine as long as you pass it a RETURN-CODE of 12 and until you return with a RETURN-CODE set to 8.

16: Terminate DFSORT
If you want to terminate DFSORT, return with RETURN-CODE set to 16. DFSORT then returns to its calling program or to the system with a return code of 16.
20: Alter Record
If you want to change the new record:
  • Move the new record to the return record field.
  • Change the record in the return record field.
  • For VLR records, move the length to the return record length field.
  • Return with RETURN-CODE set to 20.
Note: If your routine changes record size, you must indicate the new size on the RECORD statement.
20: Replace Record
If you want to replace the new record:
  • Move the replacement record to the return record field.
  • For VLR records, move the length to the return record length field. (Do not include the 4-byte RDW in this length.)
  • Return with RETURN-CODE set to 20.

See E15/E35 return codes and EXITCK for complete details of the meanings of return codes in various situations.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014