TSO-ISPF JCL COBOL VSAM DB2 CICS Tools Articles Job Portal Forum Quiz Interview Q&A

BMS Macro - DFHMDF


DFHMDF is used to define a field with its characteristic in a map. The field name is mentioned against which DFHMDF macro is coded. This field name is used inside the program. We do not write field name against constant field which we do not want to use inside the program. There can be any number of DFHMDF within DFHMDI. Some of the important operands of DFHMDF are below:

  • POS

    It has two arguments that decided the position of the field. The two arguments are line and column. It is the position where the attribute byte of the field starts.

    So if you code POS = (1,1), the attribute byte for that field is on line 1 in column 1, and the actual data starts in column 2.

  • LENGTH

    The length of the field is coded here. It excludes the attribute character.

  • ATTRIB

    All the input and output fields are prefixed by one byte attribute field that defines the attributes of the field. Some of the attributes are:

    1. ASKIP/PROT/UNPROT

      Mutually exclusive parameters that define the type of the field.

      UNPROT is coded for input and input-output fields.

      PROT is coded for output and stopper fields.

      ASKIP is coded for screen literals and skipper fields. The cursor automatically skipped to next field and so you cannot enter data into skipper field.

    2. NUM

      0-9,Period and – are the only allowed characters.

    3. BRT/NORM/DRK

      Mutually exclusive parameters that define the intensity of the field.

    4. IC

      Insert Cursor. Cursor will be positioned on display of map. If IC is specified in more than one field of a map, the cursor will be placed in the last field.

    5. FSET

      Independent of whether the field is modified or not, it will be passed to the program. MDT is set for the field.

  • JUSTIFY

    RIGHT is the default value. Code LEFT for numeric fields.

  • PICIN and PICOUT

    It defines the Picture clause of the symbolic map in COBOL and useful for numeric field editing.

  • INITIAL

    The default value of the field is coded here. When the MAP is sent, this value will appear in the field. The constant information like TITLE is coded using INITIAL keyword of field definition.

    To avoid data traffic, these constant information fields should not be coded without LABEL parameter. If there is no LABEL parameter, then symbolic map will not generated for those fields as they are unnamed fields.


Example

The following example shows how to code a field definition,

DFHMDF POS = (01,01), X
   LENGTH = 18, X
   INITIAL = ‘SAMPLE CICS SCREEN’, X
      ATTRB = (PROT,NORM)
      STDID DFHMDF POS = (01,70), X
      LENGTH = 08, X
      ATTRB = (PROT,NORM)

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