📜  CICS-BMS

📅  最后修改于: 2020-11-22 16:33:12             🧑  作者: Mango


BMS被称为基本映射支持。一个应用程序由格式化的屏幕组成,这些屏幕充当终端和CICS程序之间的桥梁。为了在终端和CICS程序之间进行通信,我们使用CICS终端输入/输出服务。我们使用BMS来创建具有适当位置和属性的屏幕设计。以下是BMS的功能-

  • BMS充当终端和CICS程序之间的接口。

  • 屏幕的设计和格式与应用程序逻辑分开。

  • BMS使应用程序硬件独立。

格式化屏幕

下面显示的屏幕是菜单屏幕,可以使用BMS进行设计。它的关键点如下-

  • 该屏幕可以具有标题,日期以及要显示的任何其他信息。

  • 选项1、2和3是“未命名”字段,它们是屏幕的标题。

  • 在选择字段中,我们需要提供输入。然后将此输入发送到CICS程序进行进一步处理。

  • 在屏幕底部,显示操作键。

  • 所有字段和屏幕本身都由BMS宏定义。定义整个地图后,我们可以使用JCL进行组装。

CICS屏幕

BMS基本术语

以下是我们将在后续模块中使用的基本术语-

地图

地图是一种单屏格式,可以使用BMS宏进行设计。它的名称可以包含1到7个字符。

地图集

Mapset是地图的集合,这些地图链接在一起以形成加载模块。它应该有一个PPT条目。它的名称可以是1到7个字符。

BMS宏

BMS映射是用汇编语言编写的用于管理屏幕的程序。用来定义屏幕的三个宏是DFHMSD,DFHMDI和DFHMDF。

DFHMSD

DFHMSD宏生成Mapset定义。这是宏标识符,它表明我们正在启动一个映射集。映射集名称是加载模块名称,并且必须在PPT表中存在一个条目。下表显示了可以在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.

以下示例显示如何编码映射集定义-

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宏生成地图定义。它表明我们正在开始一张新地图。 Mapname之后是DFHMDI宏。 Mapname用于发送或接收地图。下表显示了我们在DFHMDI宏内部使用的参数-

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.

以下示例显示如何编码地图定义-

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

DFHMDF

DFHMDF宏用于定义字段名称。提及了针对其编码DFHMDF宏的字段名称。该字段名称在程序内部使用。我们不会针对我们不想在程序内部使用的常量字段写字段名称。下表显示了可以在DFHMDF宏中使用的参数列表-

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).

以下示例显示如何编码字段定义-

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)