Screens, maps and the modern front ends
The traditional CICS user interface is a BMS map — a fixed layout of fields on a 24 by 80 screen. Increasingly the same programs are also reached through web services. Both are worth understanding because both are in production at the same sites.
What a BMS map is
A map defines where fields sit on the screen, which are protected, which the user can type into, and their initial attributes. Maps are grouped into a mapset, assembled once, and referenced by name. Assembling a map also produces a copybook of the field names, which your program includes.
* for a map field named ACCTNO, the copybook gives you: ACCTNOL PIC S9(4) COMP <- Length of what the user typed ACCTNOF PIC X <- Flag: was it modified? ACCTNOI PIC X(10) <- Input: what the user typed ACCTNOO PIC X(10) <- Output: what you send back ACCTNOA PIC X <- Attribute byte: colour, protection * so a typical validation looks like: IF ACCTNOL = ZERO MOVE 'ACCOUNT NUMBER IS REQUIRED' TO MSGO MOVE -1 TO ACCTNOL <- put the cursor here PERFORM 8000-SEND-MAP-DATAONLY END-IF
SEND MAP options that matter
| Option | Effect |
|---|---|
| MAPONLY | Send the map's fixed text only — the empty form |
| DATAONLY | Send only your data, leaving the existing screen layout |
| ERASE | Clear the screen first |
| CURSOR | Position the cursor explicitly |
| FREEKB | Unlock the keyboard so the user can type |
Forgetting FREEKB produces a screen the user cannot type into — a bug that gets reported as 'the system is frozen'.
The modern front ends
- Web services and REST — CICS can expose a program as a service, so a web or mobile front end calls the same business logic that the green screen calls.
- Channels and containers replace the commarea for these, since a JSON payload rarely fits comfortably in 32KB.
- Terminal emulation with a graphical wrapper — screen-scraping tools that present 3270 screens as a modern UI. Common, and fragile: a changed map breaks the wrapper.
Common mistakes
The keyboard stays locked and the user believes the system has hung.
DATAONLY is faster and avoids flicker; sending the full map every time is wasteful on a busy region.
Check the modified-data flag; an untouched field returns nothing, which is different from being cleared.
What you will see at work
- Map changes require assembling the mapset and a NEWCOPY, plus recompiling programs that include its copybook.
- Screen layouts are often the most stable part of an application because users are trained on them. Changing one is a business decision.
- If your site has API-enabled CICS, learn that path early — it is where new work is happening.
Key terms
Check your understanding.
Take this lesson's quiz and save your progress. Free.