CICS - BMS



BMS is known as Basic Mapping Support. An application consists of formatted screens which act as a bridge between the terminal and the CICS programs. For communication to occur between the terminal and the CICS programs, we use CICS terminal input/output services. We use BMS to create screen designs with proper positions and attributes. Following are the functions of BMS −

  • BMS acts as an interface between the terminal and the CICS programs.

  • The design and format of the screen is separate from the logic of application.

  • BMS makes the application hardware independent.

Formatted Screen

The screen shown below is a Menu Screen and can be designed using BMS. Its key points are as follows −

  • The screen could have a Title, date, and any other information that is to be displayed.

  • The Option 1, 2, and 3 are the Unnamed fields which are the titles of the screen.

  • In the Selection field, we need to provide the input. This input is then sent to the CICS program for further processing.

  • At the bottom of the screen, Action keys are displayed.

  • All the fields and the screen itself is defined with BMS macros. When the whole map is defined, we can use JCL to assemble it.

CICS Screen

BMS Basic Terms

Following are the basic terms which we will be using in the upcoming modules −

Map

Map is a single screen format which can be designed using BMS macros. It can have names containing 1 to 7 chars.

Mapset

Mapset is a collection of maps which are linked together to form a load module. It should have a PPT entry. It can have names from 1 to 7 chars.

BMS Macros

BMS map is a program which is written in Assembly language to manage screens. The three macros that are used to define the screen are DFHMSD, DFHMDI, and DFHMDF.

DFHMSD

DFHMSD macro generates Mapset definition. It is macro identifier which shows that we are starting a mapset. The mapset name is the load module name and an entry in PPT table must be present. The following table shows the list of parameters which can be used in DFHMSD −

Sr.No Parameter & Description
1

TYPE

TYPE is used to define the map type. If TYPE =
MAP - Physical map is created
DSECT - Symbolic map is created
&&SYSPARM - Physical & Symbolic, both are created
FINAL - To indicate the end of a mapset coding.

2

MODE

MODE is used to indicate input/output operations. IF MODE =
IN - For an input map only
OUT - For an output map only
INOUT For both input & output map

3

LANG

LANG = ASM/COBOL/PL1
It decides the language of the DSECT structure, for copying into the application program.

4

STORAGE

If STORAGE =
AUTO - To acquire a separate symbolic map area for each mapset
BASE - To have the same storage base for the symbolic maps of from more than one mapset

5

CTRL

CRTL is used to define the device control requests. If CTRL =
FREEKB - To unlock the keyboard
FRSET - To reset MDT to zero status
ALARM - To set an alarm at screen display time
PRINT - To indicate the mapset to be sent to the printer.

6

TERM

TERM = type ensures device independence,required if other than 3270 terminal is being used.

7

TIOAPFX

TIOAPFX = YES/NO
YES - To reserve the prefix space (12 bytes) for BMS commands to access TIOA properly. Required for the CICS command level.

Example

The following example shows how to code a mapset definition −

MPST01  DFHMSD TYPE = &SYSPARM, X
   CTRL = (FREEKB,FRSET), X
   LANG = COBOL, X 
   STORAGE = AUTO, X
   TIOAPFX = YES, X
   MODE = INOUT, X
   TERM = 3270
   DFHMSD TYPE = FINAL 
END

DFHMDI

DFHMDI macro generates map definitions. It shows that we are starting a new map. Mapname is followed by the DFHMDI macro. Mapname is used to send or receive maps. The following table shows the parameters which we use inside a DFHMDI macro −

Sr.No Parameter & Description
1

SIZE

SIZE = (Line,Column)
This parameter gives the size of the map. BMS allows us to build a screen using several maps, and this parameter becomes important when we are using more than one maps in a single mapset.

2

LINE

It indicates the starting line number of the map.

3

COLUMN

It indicates the starting column number of the map.

4

JUSTIFY

It is used to specify the entire map or the map fields to be left or right justified.

5

CTRL

CRTL is used to define the device control requests. If CTRL =
FREEKB - To unlock the keyboard
FRSET - To reset MDT to zero status
ALARM - To set an alarm at screen display time
PRINT - To indicate the map to be sent to the printer

6

TIOAPFX

TIOAPFX = YES/NO

YES - To reserve the prefix space (12 bytes) for BMS commands to access TIOA properly. Required for the CICS command level.

Example

The following example shows how to code a map definition −

MAPSTD DFHMDI SIZE = (20,80), X
   LINE = 01, X
   COLUMN = 01, X
   CTRL = (FREEKB,FRSET)

DFHMDF

DFHMDF macro is used to define field names. The field name is mentioned against which DFHMDF macro is coded. This field name is used inside the program. We do not write field name against constant field which we do not want to use inside the program. The following table shows the list of parameters which can be used inside a DFHMDF macro −

Sr.No Parameter & Description
1

POS

This is the position on the screen where the field should appear. A field starts with its attribute byte, so if you code POS = (1,1), the attribute byte for that field is on line 1 in column 1, and the actual data starts in column 2.

2

LENGTH

This is the length of the field, not counting the attribute byte.

3

INITIAL

This is the character data for an output field. We use this to specify labels and titles for the screen and keep them independent of the program. For the first field in the menu screen, for example, we will code: INITIAL = 'MENU'.

4

JUSTIFY

It is used to specify the entire map or the map fields to be left or right justified.

5

ATTRB

ATTRB = (ASKIP/PROT/UNPROT, NUM, BRT/NORM/DRK, IC, FSET) It describes the attributes of the field.

ASKIP - Autoskip. Data cannot be entered in this field. The cursor skips to the next field.

PROT - Protected field. Data cannot be entered into this field. If data is entered, it will cause the input-inhibit status.

UNPROT - Unprotected field. Data can be entered and this is used for all input fields.

NUM - Numeric field. Only numbers (0 to 9) and special characters('.' and '-') are allowed.

BRT - Bright display of a field (highlight).

NORM - Normal display.

DRK - Dark display.

IC - Insert cursor. The cursor will be positioned in this field. In case, IC is specified more than once, the cursor is placed in the last field.

FSET - Field set. MDT is set on so that the field data is to be sent from the terminal to the host computer regardless of whether the field is actually modified by the user.

6

PICIN

PICIN applies to the data field which is used as input like PICIN = 9(8).

7

PICOUT

PICIN applies to the data field which is used as output like PICOUT = Z(8).

Example

The following example shows how to code a field definition −

DFHMDF POS = (01,01), X
   LENGTH = 7, X
   INITIAL = ‘SCREEN1’, X
      ATTRB = (PROT,NORM)
      STDID DFHMDF POS = (01,70), X
      LENGTH = 08, X
      ATTRB = (PROT,NORM)
Advertisements