Converting MFS 3270 device formats to symbolic name formats using STACK/UNSTACK

The IMS MFS language utility's compilation statements STACK and UNSTACK can be used to convert existing MFS 3270 device formats to the user-defined device type symbolic name formats. The STACK statement is used to delineate one or more SYSIN or SYSLIB records, and to request that those records, once processed, be kept in storage for use at a later time. The UNSTACK statement requests retrieval of a previously processed stack of SYSIN/SYSLIB records.

For example, with the following existing 3270 format definition:

label    FMT
         DEV       TYPE=(3270,2), ...
         DIV       TYPE=INOUT
         DPAGE     CURSOR=((2,3))
label    DFLD
label    DFLD
label    DFLD
         FMTEND

You can create a user-defined device type symbolic name (using TYPE=3270-An) format for the large screened display devices by using the DEV statement and the compilation statements STACK and UNSTACK as follows:

label    FMT
         DEV       TYPE=3270,2,...
         STACK     ON
         DIV       TYPE=INOUT
         DPAGE     CURSOR=((1,2))
label    DFLD
label    DFLD
label    DFLD
         STACK     OFF
         DEV       TYPE=3270-A2,...
         UNSTACK
         FMTEND

The UNSTACK statement causes the statements between STACK ON and STACK OFF to be duplicated. In addition to the 3270 model 2 device format, a device format is created for the 3270-A2, which has the same device layout as the 3270 model 2.