Output message formatting options

MFS provides three message formatting options for output data. The option selected determines how the data is formatted and governs the way in which the application program builds the output message.

Option 1, 2, or 3 is specified in the OPT= operand of the MOD MSG statement.

Segments inserted by the application program must be in the sequence defined to the MFS Language utility program. Not all segments in a logical page must be present, but be careful when you omit segments. An option 1 or 2 segment can be omitted if all subsequent segments to the end of the logical page are omitted; otherwise, a null segment (X'3F') must be inserted to indicate segment position. Option 3 output message segments must include a 2-byte relative segment number.

Message fields in option 1 and 2 output segments are defined as fixed-length and fixed position. Fields can be truncated or omitted by two methods:

Message fields in option 3 segments can be placed in any order and with any length that conforms to the segment size restriction. Short fields or omitted fields are padded as defined to the MFS Language utility. Each field must be preceded by a 4-byte field prefix of the same format provided by MFS for option 3 input fields.

While option 3 fields do not have to be in sequence in the output segment, all fields must be contiguous in the segment; that is, the field prefix of the second field must begin in the byte beyond the first field's data. Null characters in option 3 fields have no effect on the data transmitted to the device. Like other nongraphic characters, they are replaced with a blank.

Restriction: Device control characters are invalid in output message fields under MFS. For 3270 display and SLU 2 terminals, the control characters HT, CR, LF, NL, and BS are changed to null characters (X'00'). For other devices, these characters are changed to blanks (X'40'.) All other nongraphic characters (X'00' through X'3F' and X'FF') are changed to blanks before transmission, with the exception of the shift out/shift in (SO/SI) characters (X'0E' and X'0F') for EGCS capable devices. (The SO/SI characters are translated to blanks only for straight DBCS fields.) An exception is allowed for SLU P (DPM-An) remote programs and ISC (DPM-Bn) subsystems, for which GRAPHIC=NO can be specified on output. If nongraphic data is allowed through this specification, the null (X'3F') cannot be used to truncate segments in options 1 and 2.

Option 1 or 2—output segment example

 
Definition              Output data length
Segment
Field, length=10        4
Field, length=20        field omitted
Field, length=5         5
Field, length=15        15
The segment shown produces the following results:
CONTENTS |54|0|0| DATA 1|*|    |*       | DATA 3 | DATA 4|
--------------------------------------------------------
LENGTH    2  1 1  4      1  5   20      5        15
 

Option 3—output segment example

An option 3 segment that produces the same result appears as follows (the * represents a null (X'3F') character):
CONTENTS |42|0|0|04|08|04| DATA 1|09|34| DATA 3 |19|39| DATA 4|
---------------------------------------------------------------
LENGTH    2  1 1 2  2  2   4      2  2    5      2  2   15