CICSintermediate

BMS Maps and Screen Handling

Understand how Basic Mapping Support (BMS) separates screen layout from program logic for 3270 terminal interfaces.

Basic Mapping Support (BMS) is CICS's mechanism for defining 3270 terminal screen layouts independently of the COBOL program logic that populates and reads them — a genuinely important separation-of-concerns idea that predates the MVC pattern by decades and is exactly the kind of design principle interviewers like to see candidates connect to modern equivalents.

BMS is like separating a printed form's template (where each blank line and label sits on the page) from the handwriting that fills it in — you can redesign the form's layout entirely without changing a single instruction about what data goes in the 'name' blank versus the 'address' blank.

Key Concepts

1
A BMS map is assembled from macros (DFHMSD, DFHMDI, DFHMDF) that define each field's screen position, length, attributes (protected/unprotected, bright/dim, numeric-only), and a symbolic name. Assembling the map generates two outputs: a physical map (the load module CICS uses at runtime to actually paint the screen) and a symbolic map (a COBOL copybook with a data structure matching every field, used by your program to move data in and out).
2
The symbolic map's generated copybook gives each field a length subfield (typically suffixed 'L'), an attribute subfield ('A'), and the data field itself, plus in newer versions a flag subfield ('F') — understanding this naming convention is essential to reading and writing any BMS-driven program, since your COBOL logic interacts entirely through these generated field names, never directly with screen coordinates.
3
A program sends a map to the terminal with EXEC CICS SEND MAP and receives user input back with EXEC CICS RECEIVE MAP, and interviewers often probe whether you understand that only fields the user actually modified are returned with meaningful data on RECEIVE MAP (unmodified fields' length subfields come back as -1 or zero), which is precisely why checking length subfields before using a field's value is standard defensive practice in CICS/BMS programs.