MainframeMaster
Progress0 of 0 lessons

CICS BMS (Basic Mapping Support)

Learn how to design and manage terminal screens using CICS BMS. Master physical and symbolic maps, mapsets, attributes, and advanced techniques for creating professional user interfaces.

What is BMS?

Basic Mapping Support (BMS) is a CICS facility that separates screen design from application logic. It allows developers to create professional terminal screens with consistent formatting, attributes, and user experience across different terminal types.

Screen Design

Define screen layouts, field positions, and visual attributes independently of application programs.

Terminal Independence

Create screens that work across different terminal types (3270, 5250, etc.) without modification.

Maintenance

Update screen layouts without changing application code, improving maintainability and consistency.

Physical vs Symbolic Maps

Understanding the difference between physical and symbolic maps is crucial for effective BMS development. Each serves a specific purpose in the screen design and application integration process.

Physical Maps

Purpose: Define the visual layout and appearance of screens

Content: Field positions, attributes, colors, highlighting

Compilation: Assembled into load modules

Usage: Referenced by application programs

Example Physical Map:

assembler
1
2
3
4
5
6
7
CUSTOMER DFHMSD TYPE=&SYSTEM CUSTOMER DFHMDI SIZE=(24,80) CUSTOMER DFHMDF POS=(1,1),ATTRB=BRT,INITIAL='CUSTOMER INQUIRY' CUSTOMER DFHMDF POS=(3,1),ATTRB=BRT,INITIAL='CUSTOMER ID:' CUSTOMER DFHMDF POS=(3,15),ATTRB=(UNPROT,BRT),LENGTH=10 CUSTOMER DFHMDF POS=(5,1),ATTRB=BRT,INITIAL='CUSTOMER NAME:' CUSTOMER DFHMDF POS=(5,15),ATTRB=(UNPROT,BRT),LENGTH=30

Symbolic Maps

Purpose: Provide data structures for program interaction

Content: Field definitions, data types, lengths

Compilation: Generated COBOL copybooks

Usage: Included in application programs

Example Symbolic Map:

cobol
1
2
3
4
5
6
7
8
9
10
11
01 CUSTOMER. 05 CUSTOMER-HEADER. 10 CUSTOMER-TITLE PIC X(20). 05 CUSTOMER-ID-PROMPT. 10 CUST-ID-LABEL PIC X(12). 05 CUSTOMER-ID-FIELD. 10 CUST-ID-INPUT PIC X(10). 05 CUSTOMER-NAME-PROMPT. 10 CUST-NAME-LABEL PIC X(14). 05 CUSTOMER-NAME-FIELD. 10 CUST-NAME-INPUT PIC X(30).

How Physical and Symbolic Maps Work Together

1

Physical Map

Defines screen layout and appearance

2

Symbolic Map

Provides data structures for programs

3

Application

Uses both for screen management

The physical map defines what the user sees, while the symbolic map defines how the program interacts with the screen data. Both are compiled and linked together for runtime execution.

Mapsets

Mapsets are collections of related maps that are compiled together. They provide organization, reusability, and efficient management of multiple screen definitions.

Mapset Structure

DFHMSD: Mapset definition statement

DFHMDI: Map definition statement

DFHMDF: Field definition statement

DFHMSD TYPE=&SYSTEM: System-generated symbolic maps

Complete Mapset Example:

assembler
1
2
3
4
5
6
7
8
9
10
11
12
CUSTOMER DFHMSD TYPE=&SYSTEM,LANG=COBOL,TERM=3270 CUSTOMER DFHMDI SIZE=(24,80),LINE=1,COLUMN=1 CUSTOMER DFHMDF POS=(1,1),ATTRB=BRT,INITIAL='CUSTOMER INQUIRY' CUSTOMER DFHMDF POS=(3,1),ATTRB=BRT,INITIAL='CUSTOMER ID:' CUSTOMER DFHMDF POS=(3,15),ATTRB=(UNPROT,BRT),LENGTH=10 CUSTOMER DFHMDF POS=(5,1),ATTRB=BRT,INITIAL='CUSTOMER NAME:' CUSTOMER DFHMDF POS=(5,15),ATTRB=(UNPROT,BRT),LENGTH=30 CUSTOMER DFHMDF POS=(7,1),ATTRB=BRT,INITIAL='ADDRESS:' CUSTOMER DFHMDF POS=(7,15),ATTRB=(UNPROT,BRT),LENGTH=50 CUSTOMER DFHMDF POS=(9,1),ATTRB=BRT,INITIAL='PHONE:' CUSTOMER DFHMDF POS=(9,15),ATTRB=(UNPROT,BRT),LENGTH=15 CUSTOMER DFHMDF POS=(11,1),ATTRB=BRT,INITIAL='F1=HELP F3=EXIT F4=PROMPT'

Mapset Benefits

  • Organization: Group related maps together
  • Reusability: Share common elements across maps
  • Maintenance: Update multiple maps simultaneously
  • Consistency: Ensure uniform appearance
  • Efficiency: Single compilation and loading
  • Version Control: Manage related changes together

BMS Attributes

BMS attributes control the appearance and behavior of screen fields. They define protection, highlighting, colors, and other visual characteristics that enhance user experience.

Protection Attributes

PROT

Protected field - user cannot modify

UNPROT

Unprotected field - user can input data

ASKIP

Auto-skip field - cursor skips over

Highlighting Attributes

BRT

Bright (high intensity)

DRK

Dark (low intensity)

REV

Reverse video (inverted colors)

Attribute Usage Examples

Input Field with Validation

assembler
1
2
3
CUSTOMER DFHMDF POS=(3,15),ATTRB=(UNPROT,BRT),LENGTH=10 CUSTOMER DFHMDF POS=(5,15),ATTRB=(UNPROT,BRT),LENGTH=30 CUSTOMER DFHMDF POS=(7,15),ATTRB=(UNPROT,BRT),LENGTH=50

These fields are unprotected (UNPROT) for user input and bright (BRT) for visibility.

Display Fields

assembler
1
2
3
4
CUSTOMER DFHMDF POS=(1,1),ATTRB=BRT,INITIAL='CUSTOMER INQUIRY' CUSTOMER DFHMDF POS=(3,1),ATTRB=PROT,INITIAL='CUSTOMER ID:' CUSTOMER DFHMDF POS=(5,1),ATTRB=PROT,INITIAL='CUSTOMER NAME:' CUSTOMER DFHMDF POS=(7,1),ATTRB=PROT,INITIAL='ADDRESS:'

These fields are protected (PROT) and bright (BRT) for labels and headers.

COPY and REUSE Techniques

COPY and REUSE techniques allow you to create modular, maintainable BMS definitions. They promote code reuse, consistency, and easier maintenance across multiple screens.

COPY Statement

Purpose: Include common map definitions

Usage: Reference existing map components

Benefits: Reduce duplication, ensure consistency

COPY Example:

assembler
1
2
3
4
5
CUSTOMER DFHMSD TYPE=&SYSTEM,LANG=COBOL CUSTOMER DFHMDI SIZE=(24,80) CUSTOMER COPY HEADER CUSTOMER COPY CUSTOMER-FIELDS CUSTOMER COPY FOOTER

REUSE Statement

Purpose: Reuse existing map definitions

Usage: Reference complete maps

Benefits: Full map reuse, maintainability

REUSE Example:

assembler
1
2
3
4
5
CUSTOMER DFHMSD TYPE=&SYSTEM,LANG=COBOL CUSTOMER DFHMDI SIZE=(24,80) CUSTOMER REUSE HEADER-MAP CUSTOMER REUSE CUSTOMER-INPUT-MAP CUSTOMER REUSE FOOTER-MAP

COPY and REUSE Examples

Common Header Map

assembler
1
2
3
4
5
6
HEADER DFHMDI SIZE=(3,80) HEADER DFHMDF POS=(1,1),ATTRB=BRT,INITIAL='CUSTOMER INFORMATION SYSTEM' HEADER DFHMDF POS=(2,1),ATTRB=DRK,INITIAL='USER:' HEADER DFHMDF POS=(2,15),ATTRB=(UNPROT,BRT),LENGTH=8 HEADER DFHMDF POS=(2,30),ATTRB=DRK,INITIAL='DATE:' HEADER DFHMDF POS=(2,40),ATTRB=(UNPROT,BRT),LENGTH=8

Using COPY in Main Map

assembler
1
2
3
4
5
6
7
CUSTOMER DFHMSD TYPE=&SYSTEM,LANG=COBOL CUSTOMER DFHMDI SIZE=(24,80) CUSTOMER COPY HEADER CUSTOMER DFHMDF POS=(4,1),ATTRB=BRT,INITIAL='CUSTOMER INQUIRY' CUSTOMER DFHMDF POS=(6,1),ATTRB=BRT,INITIAL='CUSTOMER ID:' CUSTOMER DFHMDF POS=(6,15),ATTRB=(UNPROT,BRT),LENGTH=10 CUSTOMER COPY FOOTER

Quick Quiz

Question 1:

What is the difference between physical and symbolic maps?

Question 2:

What does the UNPROT attribute do?

Question 3:

How do COPY and REUSE statements differ?