Created On:  29 February 2012

Problem:

RTS114 abends when calling MFJSZ099.

Resolution:

The utility MFJSZ099 emulates the IBM mainframe DYNALLOC macro, which uses SVC99 to perform dynamic allocation of datasets from within a batch program.

One of the common problems when using this utility is RTS114 abends when calling MFJSZ099, with no obvious errors in the parameters passed to the utility via the S99RB interface structure, and associated Text Unit structures.

The most likely cause of this abend is the inability of MFJSZ099 to locate the "end of pointer list" indicator that must follow the list of Text Unit pointers, the first of which is addressed by the pointer S99RB-S99TU-ARRAY-PTR.

There are two conventions used by the utility, one of which emulates the mainframe "end of parameter list" convention, while the other is specific to MicroFocus. The convention that MFJSZ099 will use is determined by the length specified in the interface variable S99RB-LEN :-

MOVE S99RB-LEN-HOST   TO S99RB-LEN                 -> This will cause the mainframe convention to be selected
MOVE S99RB-LEN-MF-EXT TO S99RB-LEN               -> This will cause the MicroFocus convention to be selected

When the mainframe convention is being used, the value of the "end of pointer list" indicator must be x'80000000', but when the MicroFocus convention is in effect, the value of the "end of pointer list" indicator must be high values (or all x'FF') - if the value and the convention do not match then MFJSZ099 will be unable to locate the indicator, and will "run off the end" of the pointer list, and hence cause an RTS114 abend.

Please note that the mainframe convention always uses 4 byte pointers, whereas the MicroFocus convention will use either 4 byte or 8 byte pointers, depending on whether running in 32bit or 64bit mode. The actual value contained within S99RB-LEN-MF-EXT, and the size of the variable S99RB-LAST-PTR-VAL-X4-VAL are both controlled dynamically via the setting of the P64 compiler directive, so the latter variable may always be used to assign the correct value to the "end of pointer list" indicator, when the MicroFocus convention is in effect.

Incident #2560250