TSO-ISPF JCL COBOL VSAM DB2 CICS IMS-DB IMS-DC Tools Articles Forum Quiz Interview Q&A

MFS Control Blocks


To get a better understanding of MFS and how it functions, we will explore the relationships between the four MFS control blocks.

The application programmer normally does the actual definition of the MFS control blocks.

The Combination of MID/MOD and DIF/DOF control blocks for a given message make up the format.


Device input Format:

Every device sending a message using MFS must first be defined through the DIF control block. The DIF describes the physical device characteristics and how messages are formatted from the device. Typically, each format will create its own DIF, although a single DIF can be used by many other formats.

Each time a device sends a message MFS retrieves the appropriate DIF to determine the format of the message, before restructuring it and sending it to the application program. MFS generates the DIF based on the device information supplied in the format.


Message Input Descriptor:

Once MFS receives a message from a device, it restructures the message according to the format defined in the MID. Once the message is reformatted, the message is then sent to the application program for processing.

Note: For every MID, there must be a corresponding DIF, and vice versa.


Message Output Descriptor:

When an online IMS application program wishes to send a message back to an operator, the message must be constructed according to the MOD definition. It is not mandatory for every MOD to have a corresponding MID. If no MID exists for a MOD, MFS will not process any data input to the MOD.

Device Output Format:

After MFS receives a message formatted by the MOD, it reformats the message for the receiving device using the DOF. The DOF describes how message are formatted to the device. Like the DIF, a single DOF can be used by many formats.

Each time a device receives a message, MFS retrieves the appropriate DOF to determine the format of the message before restructuring it and sending it to the device, MFS generates the DOF based on the device information supplied in the format. For every DOF, there must be a corresponding MOD.

In many cases, the input and output screens appear the same. In this case, we can use a feature of MFS coding that allows one set of source statements to generate both the DIF and DOF control blocks. This is called coding a DIF/DOF.

Note: For every MOD, there must be a corresponding DOF.



If you have any doubts or queries related to this chapter, get them clarified from our Mainframe experts on IBMMainframer Community!

Are you looking for Job Change? Job Portal