This exit can only be used for an invoked merge and must be coded in line with the invoking program. It therefore never appears on the MODS statement. When an E32 routine is used, all SORTINnn DD statements will be ignored by the merge; the exit must supply all the input records, and the number of input files to be created must be supplied by either the invoking program’s parameter list or the FILES=n parameter on the MERGE control statement.
Whenever the merge requires a new input record, MFX calls the E32 routine, passing it the address of a parameter list with three entries in Register 1.
The 32-bit parameter list has the following format:
|
The 64-bit E32 parameter list can be enabled from the 64-bit sort invocation parameter list. It has the following format:
|
The first entry of the parameter list contains a hexadecimal representation of the input file MFX is currently processing. This is initialized as 0 for the first file and incremented by 4 every time a new SORTINnn file is to be accessed. When the E32 encounters end-of-file on a SORTINnn file it should return RC=8 to MFX, which will no longer request input from that file (i.e., that input file number).
The E32 routine must respond to three different cases: (a) MFX already has all the input records; (b) the previous record finished an input file; and (c) there is at least one more record to be added to the file with this file number. Only in the last case will the E32 supply a record address to the merge, placing it in the second entry of the parameter list. The E32 also places the appropriate return code in Register 15.