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

IMS Creating an MFS Format


The MFS language used to create formats is a set of IMS/VS Assembler Language macro statements. This section describes some common statements and their relationships in defining the MFS control blocks.

When defining an MFS format, remember that the statements are designed around the four MFS control blocks—the DIF, DOF, MID, and MOD. Within each statement set there is a logical hierarchy of statements that must be followed.

The hierarchy will be shown before each set of control block sources is explained. There is no strict order of coding MFS control blocks, however, most application programmers code the control blocks in a physical then logical sequence (first code the DIF/DOF, then the MID/MOD). The statements discussed in this section will be presented in the order you would typically code when constructing a format definition.

To better understand this process, we will construct an actual format as each statement is discussed.

The device statements have a hierarchy as follows:
FMT--------------Defines a device format (DIF/DOF)
       DEV------------Defines device characteristics
         DIV----------Defines device formats within DIF and DOF
           DPAGE------Defines logical page, cursor position, and
                      also a fill character
              DFLD----Defines input, output, and literal fields
                      that will appear on the device
              DFLD


              DEV------------Defines another device characteristics. One
                                    Format set can cater for multiple device
                                    Types, IMS making the choice of which set to
                                    Use depending on terminal type.
                       DIV
                         DPAGE
                            DFLD
                           DFLD
                           .
                   FMTEND-----------Defines the end of the DIF or DOF   

Note: All statements figures will follow the same notation. The parameters within braces {} and separated by the word or, indicate you should choose one. The parameters within <> indicate they are optional. Lower case letters and words indicate the value is determined by you, Capital letters, numbers, and special characters =,( )’ indicate they should be coded exactly as seen. If continuing parameters from one line to the next, you need a nonblank character in column 72 and the statement will continue 16. An asterisk (*) in column 1 of your MFS source indicates to the assembler that this is a comment statement.

Some parameters may be optional but may not be indicated within <>.


FMT- Format Definition:

The FMT statement defines the beginning of a device format definition (DIF/DOF). The statements following the FMT further define how date is to be formatted on the device. Below figure shows the coding format for the FMT statement.

------------------------------------------------------------------------
COLUMNS
****#****1*****1***2****$****3****$****4****$****5****$****6****$*****77
1        0     6   0         0         0         0         0          12
------------------------------------------------------------------------
label    FMT   {blanks or comments}

Label: This is the label associated with the device format. It can be from one to six characters in length, and will be referenced by the SOR=parameter on the MSG statement coded later. This label will be used to identify the DIF and DOF control blocks.

To begin coding example, start with a FMT statement as shown below.

------------------------------------------------------------------------
COLUMNS
****#****1*****1***2****$****3****$****4****$****5****$****6****$*****77
1        0     6   0         0         0         0         0          12
-----------------------------------------------------------------------
ABCSTA   FMT

Above are some of the attributes available. At this point, you can enter data into the various fields to see how they react to the listed specifications. When you finish testing, press PF1 to return to the first format, then press PF3 to exit IMS.



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