Logical pages

Output segments can be grouped for formatting by defining logical pages (LPAGE statement).

MESSAGE
    LPAGEs
        SEGMENTs
            FIELDs

When LPAGEs are defined, each LPAGE is related to a specific DPAGE that defines the device format for the logical page. If LPAGEs are not defined, MFS considers the defined message as one LPAGE and the rules that apply for messages with one LPAGE apply. Those rules are:

When a message has one LPAGE with one segment, each segment inserted by the application program is edited in the same manner.

When a message has one LPAGE with multiple segments, message segments must be inserted in the defined sequence. Not all segments in an LPAGE must be presented to IMS, but be careful when segments are omitted. An option 1 or 2 segment can be omitted if all segments to the end of the LPAGE are omitted; otherwise, a null segment must be inserted to indicate segment position. Option 3 output message segments can be omitted but the segments sent must include the segment number identifier.

Multiple series of segments can be presented to IMS as an output message. If the LPAGE is defined as having N segments, segment N+1 is edited as if it were segment 1, unless a segment with the page bit (X'40') in the Z2 field is encountered prior to segment N+1. When multiple series of output segments are presented and segments are omitted, the segment which begins a series must have bit 1 (X'40') of the Z2 field turned on.

When a message has multiple LPAGEs, data in the first segment of a series determines which LPAGE the series belongs to, which determines the editing to be performed on the segments. If the LPAGE to be used cannot be determined from the first segment of a series, the last LPAGE defined is used. Rules for segment omission are the same. A bit in the Z2 field (X'80') of the message indicates structured data is present in the outbound data stream. An output message using structured data must either define the MODNAME as blanks or binary zeros, or use MFS bypass.