REXX Variables Provided by MFX - 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

MFX provides a number of special REXX variables to facilitate the development of REXX exits. These variables offer a simple, efficient means of establishing communication between the exit and the sort/merge.

To load these variables, the following command must be used when the exit is called.

                                    ADDRESS 'SYNCREXX' 'GIVE'

When the exit completes its work, the exit should use the following sequence of commands to return the variables to MFX.

                                    ADDRESS 'SYNCREXX' 'TAKE' RETURN

The following table describes the special REXX variables.

Table 1. REXX Variables Provided by MFX

Variable

Function

SYRECORD

When the exit is entered, SYRECORD contains the current data record. The exit can accept the record, modify it or add a new record; SYACTION should be set accordingly.

If SYRECORD is null, then MFX has no data remaining. When this happens, the exit can either CLOSE or continue to INSERT new records.

SYACTION

This variable must be set before the exit returns control to MFX. It describes the disposition of the current record. Possible values for SYACTION are as follows:

ACCEPT: Retain the current record with no modification.

REPLACE: Replace the current record with the contents of the SYRECORD.

DELETE: Delete the current record.

INSERT: Insert the contents of the SYRECORD before the current record.

CLOSE: Do not return to the exit.

ABEND: Terminate MFX.

If an E15 is providing all the input (SORTIN not present), the only valid values for SYACTION are INSERT, CLOSE or ABEND.

SYEXITYP

This variable will automatically be set to E15 or E35, depending on which type of exit is being called.

SYGBLN1... 

...SYGBLN8

These eight special variables are global variables. You can set these to any value provided that the value does not exceed 15 characters in length. MFX will insure that these variables are preserved across calls to the exit.

SYGBLSTR

This is an additional global variable. You can set this to any value, provided the string does not exceed 1024 characters in length. MFX will insure that this variable is preserved across calls to the exit.