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.
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.
Define screen layouts, field positions, and visual attributes independently of application programs.
Create screens that work across different terminal types (3270, 5250, etc.) without modification.
Update screen layouts without changing application code, improving maintainability and consistency.
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.
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:
1234567CUSTOMER 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
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:
123456789101101 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).
Physical Map
Defines screen layout and appearance
Symbolic Map
Provides data structures for programs
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 are collections of related maps that are compiled together. They provide organization, reusability, and efficient management of multiple screen definitions.
DFHMSD: Mapset definition statement
DFHMDI: Map definition statement
DFHMDF: Field definition statement
DFHMSD TYPE=&SYSTEM: System-generated symbolic maps
Complete Mapset Example:
123456789101112CUSTOMER 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'
BMS attributes control the appearance and behavior of screen fields. They define protection, highlighting, colors, and other visual characteristics that enhance user experience.
PROT
Protected field - user cannot modify
UNPROT
Unprotected field - user can input data
ASKIP
Auto-skip field - cursor skips over
BRT
Bright (high intensity)
DRK
Dark (low intensity)
REV
Reverse video (inverted colors)
Input Field with Validation
123CUSTOMER 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
1234CUSTOMER 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 allow you to create modular, maintainable BMS definitions. They promote code reuse, consistency, and easier maintenance across multiple screens.
Purpose: Include common map definitions
Usage: Reference existing map components
Benefits: Reduce duplication, ensure consistency
COPY Example:
12345CUSTOMER DFHMSD TYPE=&SYSTEM,LANG=COBOL CUSTOMER DFHMDI SIZE=(24,80) CUSTOMER COPY HEADER CUSTOMER COPY CUSTOMER-FIELDS CUSTOMER COPY FOOTER
Purpose: Reuse existing map definitions
Usage: Reference complete maps
Benefits: Full map reuse, maintainability
REUSE Example:
12345CUSTOMER DFHMSD TYPE=&SYSTEM,LANG=COBOL CUSTOMER DFHMDI SIZE=(24,80) CUSTOMER REUSE HEADER-MAP CUSTOMER REUSE CUSTOMER-INPUT-MAP CUSTOMER REUSE FOOTER-MAP
Common Header Map
123456HEADER 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
1234567CUSTOMER 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
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?