DFHMSD Macro


The DFHMSD macro is a Basic Mapping Support (BMS) macro in CICS used to define a mapset. A mapset is a collection of screen layouts that define user interfaces for CICS applications. The DFHMSD macro specifies global attributes for all maps within the mapset, such as terminal characteristics, storage options, and processing modes.

Purpose -

  • Defines the properties and attributes of a mapset in a CICS application.
  • Serves as a container for multiple DFHMDI macros, which define individual maps.
  • Establishes terminal interaction modes (e.g., conversational or pseudo-conversational).
  • Controls the way maps are stored, transmitted, and displayed.

Syntax -

mapset-name DFHMSD TYPE={MAP|DSECT|FINAL},
		   MODE={IN|OUT|INOUT},
		   LANG={COBOL|PL/I|ASSEMBLER},
		   CTRL={FREEKB|PRINT|FRSET|ALARM},
		   HILIGHT={OFF|BLINK|REVERSE|UNDERLINE},
		   STORAGE=AUTO,
		   TIOAPFX=YES,
		   TERM=type,
		   COLOR=color-name
  • TYPE=MAP | DSECT | FINAL: Specifies the purpose of the mapset.
    • MAP: Indicates that the mapset is for application processing.
    • DSECT: Used to generate symbolic descriptions for the map in the specified language.
    • FINAL: Indicates the end of the mapset definition.
  • MODE=IN | OUT | INOUT Defines the input/output mode of the mapset:
    • IN: For receiving input from the terminal.
    • OUT: For sending output to the terminal.
    • INOUT: For both input and output operations.
  • LANG=COBOL | PL/I | ASSEMBLER - Specifies the programming language of the application program using the mapset. The symbolic map is generated in the specified language.
  • CTRL=FREEKB|PRINT|FRSET|ALARM
    • FREEKB: Unlocks the terminal keyboard after the mapset is sent.
    • FREEKB: is used to send the map set to printer.
    • FRSET: Resets the Modified Data Tag (MDT) for all fields in the mapset.
    • ALARM: specifies the alarm feature is to be activated.
  • HILIGHT=OFF|BLINK|REVERSE|UNDERLINE
    • OFF: is default and indicates no highlighting is used.
    • BLINK: used to specify to field must blink.
    • REVERSE: used to specify character or field displayed in reverse.
    • UNDERLINE: used to underline the field. If the terminal doesn't support highlighting, these parameters is ignored.
  • STORAGE=AUTO - Specifies that the storage required for the mapset will be automatically allocated.
  • TIOAPFX=YES | NO - Indicates whether the Terminal Input Output Area Prefix (TIOAPFX) is included in the mapset.
  • TERM=type - Defines the terminal type for which the mapset is intended, such as 3270.
  • COLOR=color-name - Specifies the color used for all maps of the map set. The COLOR operand of the DFHMDI macro can override this for individual fields. Valid colors are blue, green, neutral, pink, red, turquoise, and yellow. If the default value of the output device is ignored, it is to be used as the basic color for this map.

Examples -


Scenario - Customer Inquiry Mapset

  • Mapset name - CUSTINQ
CUSTINQ  DFHMSD TYPE=MAP,
		   MODE=INOUT,
		   LANG=COBOL,
		   CTRL=FREEKB,
		   STORAGE=AUTO,
		   TIOAPFX=YES,
		   TERM=3270

...

         DFHMSD TYPE=FINAL
		 END

Explanation - DFHMSD (Mapset Definition)

  • CUSTINQ is the mapset name.
  • TYPE=MAP: Specifies this is a mapset definition.
  • MODE=INOUT: Allows both input and output operations.
  • CTRL=FREEKB: Unlocks the terminal keyboard after the map is sent.
  • TERM=3270: Specifies the mapset is designed for 3270 terminals.

Usage in CICS Program -


The DFHMSD macro defines the mapset. The application program used the mapset to send and receive the data using CICS commands like SEND MAP and RECEIVE MAP.

  • Map name - CUSMAP
  • Mapset name - CUSTINQ
IDENTIFICATION DIVISION.
PROGRAM-ID. CUSTINQR.

DATA DIVISION.
WORKING-STORAGE SECTION.
01 WS-VAR.
...
LINKAGE SECTION.
01 DFHCOMMAREA     PIC X(10).

PROCEDURE DIVISION.

    EXEC CICS SEND
         MAP('CUSMAP')
         MAPSET('CUSTINQ')
         ERASE
         END-EXEC.

    IF EIBAID = 'ENTER' THEN
		 EXEC CICS RECEIVE
			MAP('CUSMAP')
			MAPSET('CUSTINQ')
			INTO (CUSMAPO)
         END-EXEC.
		 ...
		 ...
    END-IF.

    EXEC CICS 
		RETURN
    END-EXEC.
    GOBACK