BMS Macros
Basic mapping support (BMS) is an application programming interface between terminal devices and CICS programs. BMS provides three assembler language macro instructions (macros) for defining MAPs. These macros allow developers to create formatted 3270 terminal screens, separating the screen design (maps) from application logic.
By using BMS macros, a developer can:
- Design screens with input and output fields.
- Specify field attributes (protected, unprotected, colors, highlighting, etc.).
- Generate Physical and Symbolic Maps to be used in COBOL programs.
Scenario - Let us understand the concept by using a simple screen design.
DISPGRP DFHMSD TYPE=&SYSPARM, -
MODE=INOUT, -
LANG=COBOL, -
CNTL=(FREEKB,PRINT,FSET), -
TIOAPFX=YES
DISPLAY DFHMDI SIZE=(24, 80), -
POS=(0,0), -
ATTRIB=(BLUE,BR)
NAMETXT DFHMDF INITIAL='NAME: ', -
LENGTH=10, -
POS=(12,6), -
ATTRIBUTE=(PINK,BR)
NAME DFHMDF PICIN= 'X(8)', -
POS=(12,20), -
ATTRIB=(UNPROT,IC,ASKIP)
DISPGRP DFHMSD TYPE= FINAL
END
The map looks below in CICS region -
NAME:
BMS Basic Terms -
Here are the basic terms that are designed by using the BMS macros -
Field -
Field refers to the input or output area on the Map. Its name can consist of 1 to 7 characters.
Map -
Map is a single-screen format designed using BMS macros. It can have names containing 1 to 7 characters.
Mapset -
Mapset is a collection of maps linked together to form a load Mapset module. It should include a PPT entry and can have names ranging from 1 to 7 characters.
BMS Macros -
BMS map is a program written in Assembly language to manage screens. There are three macros used to define the screen and those are -
Macro | Full Form | Description |
---|---|---|
DFHMDF | Define Field Hierarchy Map Definition Field | Defines an individual field on a screen or map |
DFHMDI | Define Field Hierarchy Map Definition Interface | Defines a single map as a collection of fields |
DFHMSD | Define Field Hierarchy Map Set Definition | Defines the map set |
Screen Definition Facility II (SDF II) is a tool for creating MAPs with additional display terminal facilities. It allows you to build screens directly from a display terminal and test their appearance and usability as needed. It produces the BMS macros and the copybook layout without requiring programming effort.