Chapter 7: For the TM/MFS Expert

This chapter describes the IMS Option support for a variety of TM and MFS features. The chapter DBD, PSB and MFS Statements has additional information.

Some of the descriptions only require a moderate understanding of MFS and IMS/ESA TM. Others require interpretation by an expert.

7.1 MFS Input Data Set Contents

IMS Option supports a large number of FMT, MID and MOD definitions in a single input data set. The actual limit is 16,535 of any one type. IBM 3270 terminal MFS descriptions must contain the MID, MOD and FMT in the same input data set. IBM 3270 printer formats require the FMT and the MOD to be in the same input data set.

The same MOD-name cannot be used to describe more than one device type, for example, both a printer and a display device. You can set Device model to gen by selecting the Advanced page on the MFS page of the Build Settings for Project dialog box on the Project menu. In the case where the same MOD is used to send a message to a display device and a printer within the same scheduling, you must remove one of the devices from the original MFS and regenerate it with a new name. Then, change the program's ISRT call to reference the new MOD-name.

The processing sequence for MFS source data sets is:

  1. The MIDs, MODs and FMTs are counted during the initial pass of the first-phase preprocessor. If more than one MOD is identified (but only one MID and one FMT) the first-phase preprocessor logically removes all MODs following the first. The rest of the MFSGEN proceeds normally. The first phase preprocessor is invoked again, this time removing all but the second MOD and so forth, until all of the MODs have been processed.

  2. If more than one FMT or more than one MID is counted during the initial pass, a SCAN phase is invoked after the first phase preprocess and before the second phase preprocess. Scanning aligns the MOD selected with its FMT and aligns the MOD with its MID. The rest of the MFSGEN proceeds normally. The MOD's operands identify the selections as follows:

    If no NXT operand is found, the first MID in the data set is used. The SOR operand is required but the optional IGNORE operand is ignored.

  3. If the DPAGE contains multiple physical pages, each physical page is selected and processed. This occurs after MOD selection and/or scan alignment, as needed. The last phase displays each physical page as it is processed.

7.2 MFS LPAGE/DPAGE Statements

The LPAGE and DPAGE statements are supported. See the other sections in this chapter for details on logical paging, operator paging control and multiple device pages.

The first-phase preprocessor handles the presence of LPAGE and DPAGE statements very much like the occurrence of multiple FMTs, MIDs or MODs. The presence of more than one LPAGE within a MID, more than one LPAGE in a MOD or more than one DPAGE in a FMT, triggers this support. The presence of only one LPAGE and only one DPAGE requires no special support.

If the multiple LPAGE/DPAGE condition is met, the SCAN phase is invoked just as if more than one MID, MOD or FMT was encountered. Although in this case, the first MOD/LPAGE is selected instead of just the first MOD. This LPAGE is aligned with its FMT/DPAGE using the MSG statement's SOR keyword to determine the FMT and the MOD's LPAGE statement's SOR keyword to determine the DPAGE. The MID is selected using the MOD's MSG statement's NXT operand. The MID's LPAGE statement's SOR operand is matched to the FMT/DPAGE selected. Multiple DPAGE-names are supported in the MID's LPAGE statement's SOR operand. If no NXT appeared in the MOD, the first MID is used. After this alignment, the rest of the MFSGEN proceeds normally. If more LPAGEs are present for this MOD, the scan phase is re-invoked for each MOD/LPAGE combination, with processing occurring for each set independently. When processing of all LPAGEs in the MOD is complete, control returns to the first-phase preprocessor for selection of the next MOD, if present, and its LPAGEs, if any, are processed and so forth until the entire MFS is processed.

7.3 MFS Physical Paging

Physical paging is indicated in the MFS source by use of a third positional operand on the DFLD statement's POS keyword. For example, POS=(03,14,02) to indicate a DFLD which is on line 3, column 14, on physical page number 2. One output message causes multiple physical pages (or screens) to be displayed.

Physical paging is supported for 3270 display devices only. Physical paging is not available when logical paging is also used. Logical and physical paging are mutually exclusive in IMS Option.

When an application returns control to IMS Option, the first physical page is displayed. Pressing Enter causes the next physical page to be displayed (NEXTPP equivalent). When you press Enter on the last physical page, the data from the screens is transmitted, the input message is formatted and the next transaction scheduled.

A PF key may also advance the physical page display. For all PF keys other than the ENDMPPI command, pressing the PF key causes the next physical page to be displayed. If pressed on the last screen, the screen data is transmitted for input message formatting. The ENDMPPI command terminates the screen display and begins input message formatting.

If the PF key is associated with an IMS/ESA command, such as /RCL, the command is processed when the screens are transmitted. Unless ENDMPPI is used, the value for the first PF key pressed in a series of physical pages takes effect when the input message is formatted.

7.4 Multi-segment Messages

Multi-segmented messages are defined in MFS with multiple SEG statements between the MSG (TYPE=INPUT or TYPE=OUTPUT) and corresponding MSGEND statement. The support for multi-segmented messages within IMS Option is:

7.5 MFS ALPHA Statement

The ALPHA statement in MFS source is supported differently in IMS Option than with IMS/ESA. Only one form is supported and it is any ALPHA statement which contains the string "abcdefghijklmnopqrstuvwxyz". When this statement is present, you can enter lower case characters in the MFS DFLD unprotected fields if the SEG statement for the input message also specifies GRAPHIC=NO. The assumption is that if you wanted to use lower case in the MFS, you would also want to use lower case in the entry fields.

IMS Option always permits any characters, including lower case, in the construction of labels and literals, whether the ALPHA statement is present or not.

7.6 MFS EQU Statement

The EQU (equate) statement is supported with the following constraints:

Unsupported EQU example:

AYJR EQU 'ATTR=YES,JUST=R'

Supported EQU examples:

AY   EQU 'ATTR=YES'
JR   EQU 'JUST=R'
A    EQU 'ATTR'
P    EQU 'PROT'
AE   EQU 'ATTR='
EP   EQU '=PROT'
PO   EQU 'POS='
L    EQU 'LTH='
     MFLD FLD1,L.4,AY,JR
FLD1 DFLD L.4,PO.(01,03),A.EP
FLD2 DFLD L.4,PO.(02,03),AE.P
FLD3 DFLD L.4,PO.(03,03),ATTR=P


Note: The specification of A.P or AE.EP is not valid. However, IMS Option makes the substitution assuming one and only one "=" (equal sign) was present - no warning message is issued.


7.7 Logical Paging with Multiple DPAGEs

The documentation here of multiple logical paging with multiple device pages is mostly a reiteration of IMS/ESA support unless specifically noted otherwise. As the terminology used for this area of MFS is not always understood, the best way to document our supported features is to describe it by example.

Multiple logical paging with multiple device paging is indicated in the MFS source statements by the presence of a COND=(mfldlabel,relational operator,value) operand on the MOD's LPAGE statement. The "mfldlabel" may also be specified as an integer value indicating an offset in the MOD. The application program indicates which screen (actually, which device page) is to be displayed by both the MOD-name parameter and the COND value. The application program may insert more than one screen in this manner, although only the first ISRT call is permitted to have a MOD-name parameter. IMS Option does not support multiple logical paging using different MOD-names.

Sample MFS source:

FMT1   FMT
DPAGE1 DPAGE  ...
       DFLD   ...
       DFLD   ...
DPAGE2 DPAGE  ...
       DFLD   ...
       FMTEND

MOD1   MSG TYPE=OUTPUT,
             SOR=(FMT1,IGNORE),NXT=MID1
       LPAGE SOR=(DPAGE1),
             COND=(PAGENO,=,'01')
       SEG
       MFLD  ...
PAGENO MFLD LTH=2
       LPAGE SOR=(DPAGE2),
             COND=(PAGENO,=,'02')
       SEG
       MFLD  ...
PAGENO MFLD  LTH=2
       MSGEND

       MSG TYPE=INPUT,
             SOR=(FMT1),NXT=MOD1,...
       LPAGE SOR=(DPAGE1)
       SEG
       MFLD  ...
       MFLD  ...
       LPAGE SOR=(DPAGE2)
       SEG
       MFLD  ...
       MFLD  ...
       MSGEND

From this sample MFS, the first insert call by a COBOL application would appear something like this:

MOVE 'MOD1'   TO MOD-NAME.
MOVE '01'     TO MOD-PAGENO.
CALL 'CBLTDLI' USING ISRT
                     IO-PCB
                     MOD-AREA
                     MOD-NAME.

Although subsequent insert calls are not required, they would appear something like this:

MOVE '02'     TO MOD-PAGENO.
CALL 'CBLTDLI' USING ISRT
                     IO-PCB
                     MOD-AREA.

The page numbers do not have to be inserted in the order they appear in the MOD or the FMT. They can be in any order, repeated, alternated or in any other combination. The only requirement is that after the first insert call, the MOD-name parameter is omitted.

If the COND value provided in the MOD's I/O area does not match any COND value specified in the MFS MOD LPAGE statement, the last LPAGE in the MOD is used. If a MOD contains only one LPAGE with a COND value, it has no meaning. The IMS Option MFSGEN process ignores these LPAGEs as they always cause the same screen to be inserted and no special processing is required.

7.8 Operator Paging Control

Operator paging control consists of the commands and mechanisms by which the terminal operator controls multi-paged output. This operator control facility is used whenever logical paging is used, whether for a single DPAGE or for multiple DPAGEs.

The paging control is indicated by the use of:

Command
Description
=nnnn Indicates the specific page number to be displayed next. An "nnnn" value of 1 causes the first page of the set to be displayed
=+nnnn Indicates the number of the page to be displayed as a number of pages forward from the current page. A value of +2, for example, would cause the second page, after the current displayed page, to be displayed next.
=-nnnn The same as "+" except the movement is backward instead of forward
=L Indicates the last page is displayed

These control statements can be entered from one of the following:

To use the cleared screen technique, press Alt+F2 from an MFS screen, type the paging command and press Enter to process the page request.

7.9 /FOR Command and LPAGE

When a /FOR command is issued for a MOD which contains multiple LPAGEs, the last LPAGE in the MOD determines which DPAGE is displayed. With IMS/ESA, it is possible under some constraints, to issue a /FOR command with the COND value following the MOD-name. For example, /FOR MOD1 01. This is not supported by IMS Option.

7.10 MFS Field Exits

MFS input MFLD (MID) field exits can be re-written from Assembler to COBOL or the Assembler routines from IMS/ESA may be used if you have Assembler Option. You can use the TM/MFS configuration option Invoke input message edit routines to specify whether COBOL or Assembler routines should be called. To access this, select the TM/MFS page on the IMS System Properties dialog box. The default is unselected, with field exits not invoked.


Note: You can access the IMS System Properties dialog box by selecting the IMS View of the project and right-clicking IMS System. Then click Properties.


If you select COBOL, IMS Option calls the exit using standard COBOL linkage conventions. The calling parameters are otherwise the same as on IMS/ESA. A sample COBOL field exit is provided with IMS Option and is named dfsme000.cbl. This program has comments in it which further describe the use of COBOL field exits. When you add this source to your project and compile it, the load module is added to the Project's default Load Library folder defined in the Workgroup tab.

If you select Assembler, you must also preprocess, assemble and link the ims2asm.mlc program provided with IMS Option. The IMS2ASM routine is a "glue" module and converts the COBOL standard linkage parameters from IMS Option into the non-standard form which IMS/ESA uses for Assembler. See the ims2asm.mlc program for further details.

The naming convention is the same as IMS/ESA. The field exit program name is always "DFSME" followed by the field exit number expressed as a three digit decimal number. For example, for field exit number "zero", the name would be DFSME000.

The field exit can be debugged as any other application program. When a transaction program issues the GU or GN for the input message, the field exit is invoked and is debugged if it has been prepared for debugging. To do this:

  1. Select the Files tab

  2. Select the COBOL folder on the left-hand pane of the project window

  3. Right-click on Dfsme000.cbl on the right-hand pane of the project window and select Build Settings for Dfsme000.cbl from the popup menu

  4. On the General page check Create debug information

  5. Click OK

7.11 MFS Input Message Segment Edit Routines

IMS Option supports MFS input message segment edit routines (DFSMExxx). This support is similar to the support of MFS field exit routines but is limited to single segment messages. MFS segment and field exits can not be configured independently. As in the existing field exit support, there is no support for IMS callable services and no emulation of IMS control blocks.

These edit routines can be written in COBOL or Assembler:

The exit language configuration option specifies the exit language and allows exit routines to be disabled. You can find this option on the TM/MFS page of the IMS System Properties dialog box.

7.12 FILL=NULL Support

FILL=NULL can be specified on any MFLD. This support is provided with single-segment and multi-segment messages, with or without logical paging.

7.12.1 Restrictions

There are two restrictions with FILL=NULL. They are:

7.13 IMS Connect

IBM IMS Connect is an add-on product to IMS/ESA that provides TCP/IP connectivity to IMS/TM applications. IMS Option includes partial emulation of IMS Connect to allow TCP/IP clients to connect to Mainframe Express for debugging of IMS/TM transactions.

7.13.1 Restrictions

The following restrictions apply to IMS Connect emulation.

7.13.2 Configuration

Configuration of the IMS Connect Server involves defining a TCP/IP communications port number. This port number is specified in the IMS System Properties dialog box. To access this, select the TM/MFS more page on the IMS System Properties dialog box. The default value is 6000.


Note: You can access the IMS System Properties dialog box from the IMS View of the project by right-clicking IMS System then clicking Properties.


Client TCP/IP applications must specify the IP name or IP address of the machine running the IMS Connect Server, even when both are on the same machine. In addition, client applications must also specify the port number assigned to the IMS Connect Server.

7.13.3 Starting and Stopping the IMS Connect Server

The IMS Connect Server is started by use of a special system command. To start the server, enter /IMSCONN at the Start Debugging IMS prompt. This command takes no additional parameters.

IMS Connect is stopped either by the Stop Debugging menu item or by the Shutdown button in the IMS Connect browser interface.

7.13.4 Browser Interface

The IMS Connect Server recognizes HTTP messages from a browser and will respond with a status message. This response message contains server information in addition to Refresh and Shutdown buttons. The Refresh button causes redisplay of the status information. The Shutdown button signals the server to terminate.

To access the browser interface, specify the URL for the IMS Connect Server in your browser's address field. The URL of the IMS Connect server consists of the IP name or IP address of the machine running the IMS Connect Server, and the port number assigned to IMS Connect. The format of this is:

http://ip-name:port-number

Where ip-name is either the IP name or the dot-delimited IP address of the machine running the IMS Connect Server and port-number is the port assigned to IMS Connect.

7.14 Telnet 3270 Terminal Emulator Interface

IMS Option includes an interface to allow use of a TN3270 terminal emulator in place of the built-in 3270 terminal emulation. This allows IMS Option to use the same terminal emulator used to connect to your mainframe IMS/ESA system. This also allows for custom keyboard configuration, screen colorization and testing of HLLAPI applications. TN3270 can be used for both MFS and bypass MFS applications.

The TN3270 emulator session can run on the same machine as Mainframe Express or on a network connected machine. When the TN3270 emulator is running on the same machine, it is possible to configure IMS Option to control starting and stopping of the emulator and context switching between the emulator and Mainframe Express debugger. See the section Advanced Configuration for information on integrating IMS Option with third-party TN3270 terminal emulators.

7.14.1 Emulators Supported

IMS Option has been been tested with several third-party TN3270 terminal emulators. The current list of emulators that have been verified to work are listed in the on-disk file mfims.ini installed in the \mfe\mfims\source folder.

7.14.2 Configuration

Configuring the TN3270 interface involves specifying the TCP/IP port number used by the terminal emulator. This port number is specified in the IMS System Properties dialog box. The default TCP/IP port number is 23.

A check-box is used to enable TN3270 emulation of MFS screens. The default value is, not enabled. This is also located in IMS System Properties.

To access these parameters, select the TM/MFS more page on the IMS System Properties dialog box.


Note: You can access the IMS System Properties dialog box from the IMS View of the project by right-clicking IMS System then clicking Properties.


7.14.3 Advanced Configuration

When running the TN3270 emulator on the same machine as Mainframe Express, additional configuration can optionally be used to control starting, stopping and context-switching between the emulator and debugger. This additional configuration is done in the IMS Option configuration file mfims.ini.

The mfims.ini file must be located in the mfuser\config folder. TN3270 settings are located immediately following the [TN3270] header line in the file. There is an sample mfims.ini file in the \mfe\mfims\source folder that provides several examples of TN3270 configuration. The format of these TN3270 settings is:

keyword(value)

The keyword can begin in any column and is case sensitive. Embedded spaces within a value are permitted. TN3270 keywords are:

EMULATOR

Specifies the TN3270 emulator product.

Syntax:
EMULATOR(product-name)
Parameters:
product-name Values of product-name are:
HOSTEX Hummingbird HostExplorer
IBMPCOM IBM Personal Communications
RUMBA Wall Data Rumba
EXTRA Attachmate EXTRA
QWS3270 QWS3270 TN3270 Terminal emulator
OTHER Generic TN3270 emulator not specifically supported.

See the sample mfims.ini file in the mfe\mfims\source folder for an up to date list of supported TN3270 emulators.

CMDLINE

Specifies the command line to start the TN3270 emulator. This should include any parameters required to start the emulator session. When EMULATOR is specified, CMDLINE is required.

Syntax:
CMDLINE(command-line)

See the sample mfims.ini file in the \mfe\mfims\source folder for command line examples.

WINTITLE

The title of the TN3270 emulator session main window. The default value is MFIMS. If the window title of the TN3270 session can be configured, it should be set to MFIMS. If the TN3270 session can not be configured to have the title MFIMS, you must include this setting and specify the name of the emulator window as it appears on the task bar.

Syntax:
WINTITLE(title)

WINCLASS

The windows class associated with the TN3270 emulator session main window. This setting is required when EMULATOR(OTHER) is specified.

Syntax:
WINCLASS(class-name)

7.15 Bypass MFS

IMS Option includes limited support of bypass MFS. This support is provided through use of a third-party TN3270 terminal emulator. See the section Telnet 3270 Terminal Emulator Interface for information on using TN3270 terminal emulation with IMS Option.

IMS/TM applications that use message output descriptors DFS.EDT and DFS.EDTN are supported, provided they don't also use conventional MFS. Applications that use a mix of MFS and non-MFS screens are not supported.

7.15.1 Physical Terminal Edit Routines

IMS Option includes limited support for global physical terminal input/output edit routines written in Assembler. These terminal edit routines must be assembled and linked using Assembler Option. You must also assemble and link the supplied routine ims2asm.mlc. This program is a glue module which changes the parameters passed from IMS Option to the non-standard linkage convention defined by IMS/ESA for these exits. See the comments in the ims2asm.mlc program for details. This program is provided in the \mfe\mfims\source folder.

Terminal edit routines can not be assigned to specific LTERMs. Support is limited to one input routine and one output routine. The names of the input and output routines are specified in the IMS System Properties dialog box. To access these, select the TM/MFS page on the IMS System Properties dialog box.


Note: You can access the IMS System Properties dialog box from the IMS View of the project by right-clicking IMS System then clicking Properties.


When terminal edit routines are used, careful evaluation of their use of IMS control blocks is required. Simulated CLB and CTB control block structures are passed to these routines. In some cases, you may need to modify ims2asm.mlc to 'plug' fields in these structures.

7.15.2 Invoking Bypass MFS

Bypass MFS support is invoked by use of a special system command. To start IMS/TM emulation with bypass MFS support, enter /BYPASSM trancode at the Start Debugging IMS prompt where trancode is the initial transaction code.


Copyright © 2002 Micro Focus International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.