If you write your E35 user exit in COBOL, see COBOL user exit routines and COBOL E35 user exit: changing records.
The EXITCK option affects the way DFSORT interprets certain return
codes from user exit E35. To avoid ambiguity, this section assumes
that the IBM default, EXITCK=STRONG, was selected at your site. For
complete details of the meaning of E35 return codes in various situations
with EXITCK=STRONG and EXITCK=WEAK, see E15/E35 return codes and EXITCK.
DFSORT enters the E35 user exit routine each time it prepares to
place a record in the output area.
See Figure 1 for logic flow details.
Some uses for the E35 user exit are:
- Adding records for output data sets
- Omitting records for output data sets
- Changing records for output data sets
Note: - If your E35 user exit is processing variable-length records, include
a 4-byte RDW at the beginning of each record you change or insert,
before you pass it back to DFSORT. The format of an RDW is described
in z/OS DFSMS Using Data Sets or System Programming Reference. (Alternatively, you can
pad records to the maximum length and process them as fixed-length.)
- DFSORT uses the specified or defaulted value for L3 in the RECORD
statement to determine the length of the records your E35 user exit
passes back to DFSORT. For fixed-length records, be sure that the
length of each record your E35 user exit changes or inserts corresponds
to the specified or defaulted L3 value. For variable-length records,
be sure that the RDW of each record your E35 user exit changes or
inserts indicates a length that is less than or equal to the specified
or defaulted L3 value. Unwanted truncation or abends may occur if
DFSORT uses the wrong length for the records passed to it by your
E35 user exit.
For details of the L3 value, see RECORD control statement.
- If you use the E35 user exit to dispose of all your output records,
you can omit the SORTOUT DD statement.
- If you invoke DFSORT from a program and you pass the address of
your E35 user exit in the parameter list:
- DFSORT ignores the SORTOUT data set (but not any OUTFIL data sets).
- DFSORT terminates if you specify E35 in a MODS statement.
- If you omit the SORTOUT DD statement or it is ignored, and you
do not specify any OUTFIL data sets, your E35 user exit routine must
dispose of each output record and return to DFSORT with a return code
of 4. When DFSORT returns to your routine after you have disposed
of the last record, return to DFSORT with a return code of 8 to indicate"do
not return."
- Remember that if input records are variable-length from a VSAM
data set, they will have been prefixed by a 4-byte RDW.
- After records have been put into the output area, their lengths
cannot be increased.
- For a merge application, records deleted by an E35 user exit routine
are not sequence-checked. If you use an E35 user exit routine without
an output data set, sequence checking is not performed. In this case,
you must ensure that the records are sequenced correctly.