Exit E61 - Modifying the Collating Process - 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
Topic type
How Do I
Copyright
2024
First publish date
2010
Last edition
2024-08-27
Last publish date
2024-08-27T08:14:56.318001

Exit 61 is used to alter the collating of all control fields specified as having an o (order) value of E in the SORT/MERGE control statement. Note that an E61 exit routine is called in Phase 1 for sort applications and in Phase 3 for merge applications. Each time MFX encounters an order E control field, it moves a copy of the control field to a work area and passes the copy’s address to the exit routine. Thus, the E61 exit program processes a control field image while leaving the original control field intact. An order E control field is collated in ascending order according to its f (format) code and its E61 image. In order to code an effective E61 routine, you must be familiar with the standard data formats used by the operating system.

For all order E control fields except BInary fields, the number of bytes in the control field image will be the number specified as the l (length) value on the SORT/MERGE control statement. BInary fields are left and right padded with zeros to the nearest byte boundary. For example, a control field designated as 5.3,1.4,BI,E receives three bits of padding on the left, one on the right, producing an image 2 bytes long.

An E61 exit can process only the first 256 bytes of the control field image in a single pass. If a control field image is more than 256 bytes long, the exit will be entered more than once for that control field.

If AC is specified as the format of a control field on the SORT or MERGE statement, MFX will translate the field to ASCII before the E61 routine is given control. In order to use an E61 routine to modify what would be an AC control field, specify the field as CH in the SORT or MERGE statement and translate the image to ASCII after it is altered by the E61 exit routine.

There is no advantage to coding an E61 exit if the ALTSEQ control statement can provide the needed collating modification. ALTSEQ changes the installation’s alternate collating sequence, used for all control fields specified with the format code AQ.

An E61 exit cannot be used with locale processing (LOCALE option enabled).