Previous Topic Next topic Print topic


Exits

The exit programs should be written in COBOL and compiled by the Micro Focus syntax checker. They can be executed normally or debugged like any other COBOL program. Please refer to the mainframe documentation for instructions on writing and testing exit programs.

Linkage Area

MFJSORT provides a standard linkage area to the E15 and E35 exit program. It is compatible with the mainframe utility and should be defined as follows:
COBOL Statements Value
RECORD-FLAGS PIC 9(8) COMP.
0 indicates the first record passed. 4 indicates subsequent records passed. 8 indicates the last record passed.
ENTRY-BUFFER PIC X(n).
Contents of the input record. Do not change this area.
EXIT-BUFFER PIC X(n).
Contents of the new or altered record provided by the exit.
UNUSED-ENTRY PIC 9(8) COMP.
Not used
UNUSED-ENTRY PIC 9(8) COMP.
Not used
ENTRY-RECORD-LENGTH PIC 9(8) COMP.
Length of the input record.
EXIT-RECORD-LENGTH PIC 9(8) COMP.
Length of the new or altered record provided by the exit.
UNUSED-ENTRY PIC 9(8) COMP.
Not used
EXIT-AREA-LENGTH PIC 9(4) COMP.
Length of the exit area scratchpad. Do not change this field.
EXIT-AREA PIC X(n).
Exit area scratchpad used by the exit to maintain variables between calls to the exit program.

Return Codes

MFJSORT recognizes the same return codes from exit programs as the mainframe utility, as listed in the following table:
Return Code Meaning
0 No action required.
4 Delete the current record. For E15, the record is not sorted. For E35, the record is not written to the output data set.
8 Do not call this exit again; exit processing is no longer required.
12 Insert the current record. For E15, the record is inserted for sorting. For E35, the record is written to the output data set.
16 Terminate MFJSORT. The job step is terminated with the condition code set to 16.
20 Alter the current record. For E15, the altered record is passed to the sort. For E35, the altered record is written to the output data set.
Previous Topic Next topic Print topic