Mainframe Path Start learning free
Core6 min readLesson 4 of 4

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.

Field naming that a map generates
* 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

OptionEffect
MAPONLYSend the map's fixed text only — the empty form
DATAONLYSend only your data, leaving the existing screen layout
ERASEClear the screen first
CURSORPosition the cursor explicitly
FREEKBUnlock 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

Common mistakes

Forgetting FREEKB

The keyboard stays locked and the user believes the system has hung.

Sending the whole map when only data changed

DATAONLY is faster and avoids flicker; sending the full map every time is wasteful on a busy region.

Assuming a field the user did not touch is empty

Check the modified-data flag; an untouched field returns nothing, which is different from being cleared.

What you will see at work

Key terms

Check your understanding.
Take this lesson's quiz and save your progress. Free.

Take the lesson quiz
← The commands and abends you will meetBack to CICS basics