Exit E32 - Invoked Merge Only: Creating Input Records - mfx - 3.1

Syncsort™ MFX Programmers Guide

Product type
Software
Portfolio
Integrate
Product family
Syncsort™ Software
Product
Syncsort™ MFX > MFX
Version
3.1
Language
English
Content type
Programmer’s Guide
Product name
Syncsort™ MFX
Title
Syncsort™ MFX Programmers Guide
Copyright
2024
First publish date
2010
Last updated
2024-11-06
Published on
2024-11-06T17:38:26.716054

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:

Table 1. 32-bit Parameter List for E32

 PARAMETER LIST

  1. Word 1: Number of next input file
  2. Word 2: Address of the next input record (set by exit)
  3. Word 3: User exit address constant

The 64-bit E32 parameter list can be enabled from the 64-bit sort invocation parameter list. It has the following format:

Table 2. 64-bit Parameter List for E32

PARAMETER LIST

  1. Word 1:  X’00000000’    Word 2:  Number of next input file
  2. Words 3 and 4: 64-bit address of next input record (set by exit)
  3. Word 5:  X’00000000’    Word 6:  User exit address constant

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.