MFS Function

This chapter describes main functions of MFS.

1. Dynamic Field Property Change

The function dynamically changes the regular properties and extended properties of a field that is displayed on a screen. If a user application adds property values (that will be used to change the current values) in front of the field before sending it, MFS interprets it and sends it to a terminal after changing the DFLD property which is defined in a map.

1.1. Regular Property Change

In a regular property change, cursor position, field protection, number/character field, bright adjustment, hide, and MDT configuration, can be set. To use the fuction, set "ATTR=YES" in the MFLD statement, and define LTH for property data as 2 bytes longer than the actual data.

The property data bit structure is as follows:

figure 3 1
The Bit Structure of Regular Property Change Data
Byte Bit Description

0

0-1

Moves the cursor to the current field.

  • 00: CURSOR OFF

  • 11: CURSOR ON

2-7

Fixed to 0.

1

0

Fixed to 1.

1

Sets how to change the property.

  • 0: OR operation with DFLD property

  • 1: Replace the DFLD property.

2

Sets whether to protect the field.

  • 0: NOPROT

  • 1: PROT

3

Sets number/character field.

  • 0: ALPHA

  • 1: NUM

4-5

Sets the brightness

  • 00: NORM

  • 01: NODISP

  • 10: HIGH

  • 11: HIGH

6

Sets the light pen field. (not supported)

7

Sets MDT.

  • 0: NOMOD (MDT OFF. Only when data is changed, it becomes ON. )

  • 1: MOD (MDT is always ON.)

1.2. Extended Property Change

Extended property can change highlighting, color, and outline. To use the function, set MFLD statement to ATTR=(,nn). 2 bytes space is needed per property, that will be changed, so define LTH to the value which adds nn*2 to the actual data length. The property data consists of ATTR Type (1 byte) + ATTR Value (1 byte).

The following describes data.

  • Highlighting, Color

    Type Value Description

    C1(Highlighting)

    X'00'

    Default

    X’F1'

    HBLINK

    X’F2'

    HREV

    X’F4'

    HUL

    C2(Color)

    X'00'

    Default

    X’F1'

    BLUE

    X’F2'

    RED

    X’F3'

    PINK

    X’F4'

    GREEN

    X’F5'

    TURQ

    X’F6'

    YELLOW

    X’F7'

    NEUTRAL

  • Outline

    Type Bit Description

    03 (Outline replacement) 04(Outline addition)

    0-3

    Fixed to 0

    4

    Left line

    5

    Over line

    6

    Right line

    7

    Under line

    X'00'

    Default

1.3. Example

The following describes MFS map and COBOL program example that dynamically changes a regular property and two extended properties of a CODE field. The CODE field is defined as an unprotected field. But it was set to X’C0E8' in the COBOL program, so in the protected field, where the cursor is located, the character color is Turquoise and the borderline is displayed at top and bottom.

<TEST001.TXT>

*********************************************************************
TEST001  FMT
         DEV   TYPE=(3270,2),                                          X
               FEAT=IGNORE,                                            X
               DSCA=X'00A0'
               ...
CODE    DFLD  POS=(7,4),                                              X
               LTH=10,                                                X
               ATTR=(NOPROT,ALPHA,NORM,MOD)
               ...
         FMTEND
*********************************************************************
TEST001I MSG   TYPE=INPUT,                                             X
               SOR=(TEST001,IGNORE),                                   X
               NXT=TEST001O
         SEG
         MFLD  'TESTMPP1',                                             X
               LTH=8
         ...
         MSGEND
*********************************************************************
TEST001O MSG   TYPE=OUTPUT,                                            X
               SOR=(TEST001,IGNORE),                                   X
               NXT=TEST001I
         SEG
         ...
         MFLD  CODE,                                                   X
               LTH=16,ATTR=(YES,2)
         ...
         MSGEND
**********************************************************************

<TESTMPP1.cob>

       ID DIVISION.
       PROGRAM-ID.      TESTMPP1.
       AUTHOR.          TMAXSOFT.

       DATA DIVISION.

       WORKING-STORAGE SECTION.

       ...
       01  OUTPUT-MESSAGE-IO-AREA.
           05  OM-LL                   PIC S9(3) COMP.
           05  OM-Z1-Z2                PIC S9(3) COMP VALUE ZERO.
           05  OM-MSG-DATA.
               ...
               10  OM-OUT1.
                   15 OM-OUTFLD-DYNA-ATTR.
                   25 OM-OUTFLD-ATTR         PIC X(2).
                   25 OM-OUTFLD-EATTR1       PIC X(2).
                   25 OM-OUTFLD-EATTR2       PIC X(2).
                   15  OM-OUTFLD-DATA        PIC X(10).
       ...

       PROCEDURE DIVISION.
       ...
      *      CURSOR ON, ATTR OVERRIDE, PROT, HIGH
             MOVE X'C0E0' TO OM-OUTFLD-ATTR.
      *      COLOR: TURQ
             MOVE X'C2F5' TO OM-OUTFLD-EATTR1.
      *      OUTLINE: OVER,RIGHT,UNDER
             MOVE X'0305' TO OM-DAMFLD-EATTR2.
       ...

1.4. Cautions

OpenFrame is based on an ASCII environment. For property data, the character itself is not significant. Each bit has a specific meaning so the Hexa values defined on a EBCDIC environment will be used as they are. If property data is described as literal in a user application, it should be converted to EBCDIC Hexa values to enable normal operation.

For example, if the cursor is located in a field, and the dynamic property change data, which adds the NODISP property, is described in EBCDIC, it will be interpreted differently, as follows:

  • Before change

                  ...
          *      CURSOR ON, NODISP
                 MOVE '{d' TO OM-OUTFLD-ATTR.
                  ...
    figure 3 2
    Comparison of EBCDIC and ASCII Values of the Character '{d''
  • After change

                  ...
          *      CURSOR ON, NODISP
                 MOVE X'C084' TO OM-OUTFLD-ATTR.
                  ...

2. Paging

One message can consist of multiple segments, and this data can consist of one format or multiple formats. MFS supports both two cases. Browsing a single format message is called physical paging, and browsing multi-format message is called logical paging. In a single message, both logical and physical paging can be used.

This section describes each data structure and how to write a multi-format MFS definition statement.

2.1. Single Format

A regular MOD has one SEG statement, but defining multiple SEG statements is possible.

If MOD consists of two SEG statements, and the data sent from an application has 5 segments, one message will be displayed by being divided into three as shown in the following figure. To see the next data from the first screen (displays the first and second segments), press the PA1 button. For more information, refer to PA1, PA2 Functions description.

figure 3 3
Single Format Message Processing

2.2. Multi-Format

Depending on an application, a single message may have various formats of data.

In a single MFS definition statement, each screen should be defined. MOD defines the condition to distinguish data and corresponding LPAGE statement. DOF defines screen which will be displayed in each case by DPAGE statements. MFS displays an appropriate screen depending on COND of data and LPAGE statement. When MFS investigates which data belongs to which LPAGE, if there are no met conditions, the last LPAGE will be selected. MFLD which is used in the condition investigation, must be located in the first SEG.

figure 3 4
Multi-Format Message Processing

<TEST002.TXT>

*********************************************************************
TEST002  FMT
         DEV   TYPE=(3270,2),                                          X
               FEAT=IGNORE,                                            X
               DSCA=X'00A0'
               ...
PAGEA   DPAGE CURSOR=((3,2))
         DFLD  'PRODUCT CODE:',                                        X
               POS=(2,2),                                              X
               ATTR=(PROT,ALPHA,HI,NOMOD)
CODE     DFLD  POS=(3,2),                                              X
               LTH=6,                                                  X
               ATTR=(NOPROT,NUM,NORM,MOD)
               ...
PAGEB   DPAGE CURSOR=((1,2))
         DFLD  'ORDER LIST:',                                          X
               POS=(2,2),                                              X
               ATTR=(PROT,ALPHA,HI,NOMOD)
ODATE1   DFLD  POS=(3,2),                                              X
               LTH=4,                                                  X
               ATTR=(PROT,ALPHA,HI,NOMOD)
OLOCA1   DFLD  POS=(3,7),                                              X
               LTH=4,                                                  X
               ATTR=(PROT,ALPHA,HI,NOMOD)
ONUMB1   DFLD  POS=(3,12),                                             X
               LTH=3,                                                  X
               ATTR=(PROT,ALPHA,HI,NOMOD)
               ...
PAGEC   DPAGE CURSOR=((1,2))
         DFLD  'STOCK LIST:',                                          X
               POS=(2,2),                                              X
               ATTR=(PROT,ALPHA,HI,NOMOD)
SLOCA1   DFLD  POS=(3,2),                                              X
               LTH=4,                                                  X
               ATTR=(PROT,ALPHA,HI,NOMOD)
SNUMB1   DFLD  POS=(3,7),                                              X
               LTH=3,                                                  X
               ATTR=(PROT,ALPHA,HI,NOMOD)
               ...
         FMTEND
*********************************************************************
TEST002I MSG   TYPE=INPUT,                                             X
               SOR=(TEST002,IGNORE),                                   X
               NXT=TEST002O
         SEG
         MFLD  'TESTMPP2',LTH=8
         ...
         MSGEND
*********************************************************************
TEST002O MSG   TYPE=OUTPUT,                                            X
               SOR=(TEST002,IGNORE),                                   X
               NXT=TEST002I
PRODLP  LPAGE SOR=PAGEA,COND=(LPAGEID,=,'A')
        SEG
LPAGEID MFLD  LTH=1
         MFLD  CODE,LTH=6
         ...
ORDRLP  LPAGE SOR=PAGEB,COND=(LPAGEID,=,'B')
        SEG
LPAGEID MFLD  LTH=1
         MFLD  ODATE1,LTH=4
         MFLD  OLOCA1,LTH=4
         MFLD  ONUMB1,LTH=3,JUST=R
         ...
STOCLP  LPAGE SOR=PAGEC,COND=(LPAGEID,=,'C')
        SEG
LPAGEID MFLD  LTH=1
         MFLD  SLOCA1,LTH=4
         MFLD  SNUMB1,LTH=3,JUST=R
         ...
         MSGEND
**********************************************************************

2.3. PA1, PA2 Functions

If a message cannot be displayed at once, it will be displayed on multiple pages. To go to the next page, the PA1 button is used. If the page being displayed is the last page of the message and the next message is in a queue, pressing PA1 will display the first page of the next message. If there are no messages in a queue, the current page will remain on the terminal (no change).

The PA2 button deletes the currently open message from the queue and displays the first page of the next message. If there are no messages in a queue, and if PA2 is pressed, the current message will be dequeued and the current page will remain on the terminal (no change).

figure 3 5
Execution example of PA1 and PA2

2.4. Use of the Z2 Field

If a message is organized according to the number of segments defined in MOD, the Z2 field of output message can be ignored. But to end the page without filling out all the segments defined in an application, the Z2 field of the next segment should be set to X'40' to start a new logical page and to notify it to MFS.

figure 3 6
Output Message Structure

2.5. OLP (Operator Logical Paging) Function

If 'PAGE=YES' is set in an MSG statement when defining a multi-format map, the function that goes to a certain logical page in a message can be used. To use the funciton, place the following values at the beginning of an input value.

OLP Description

=n, =nn, =nnn

Move to the page corresponding to 'n'

=+n, =+nn, =+nnn

Move to the page that is 'n' steps behind the current page.

=-n, =-nn, =-nnn

Move to the page that is 'n' steps ahead of the current page.

  • 'n' is a digit.

2.6. Operator Control Tables

It is a logical page movement function using control function. This function will be supported in the next version.