BMS-I

57
BASIC MAPPING SUPPORT PART 1

Transcript of BMS-I

Page 1: BMS-I

BASIC MAPPING SUPPORT

PART 1

Page 2: BMS-I

Enter Name:XYZENter Age:23ENTER DEPT:S/WENTER SALARY:34000

Page 3: BMS-I

LTITL

Name: XXXXXXXXXXXXXXX

Age:

Department:XXXXXXXXXXXXXX

Salary:

F1-Save F2-Exit F3-Previous

Page 4: BMS-I

BMS are macro commands written in assembly language to define a formatted screen in CICS.

BMS also eliminates the difficulties involved in NMDS.

Page 5: BMS-I

What’s NMDS?

Page 6: BMS-I

In order to get a formatted output in an IBM 3278 terminal , it must receive a stream of data called Native Mode Data Stream. NMDS is based on the hardware protocol.

Page 7: BMS-I

NMDS is a mixture of Buffer Control Characters (BCC) and text data. The application program must format all BCC’s and text data in order to get a formatted screen.

Page 8: BMS-I

Buffer Control Characters:

Buffer control characters are some control information which characterizes the format of the output screen.

Page 9: BMS-I

STX

ESC

EW

WCC

SBA

08SF

ATR

SF

ATR

PNC2 ETX

STX Start Text

ESC Escape Command

EW Erase/Write

WCC Write control character

SBA Set Buffer Address

SF Start Field

ATR Attribute Character

ETX End Text

Page 10: BMS-I

Disadvantages of NMDS.

Page 11: BMS-I

Consider the following situation:

1. The terminal device has been changed.

2. The screen format has been changed , though the length remains same.

Page 12: BMS-I

In each of the above said situations the program should be changed.

This reduces the maintainability of the application.

Page 13: BMS-I

To eliminate the disadvantages of NMDS , and to obtain device independence and format independence CICS introduced BMS.

Page 14: BMS-I

What’s Device Independence & Format Independence?

Page 15: BMS-I

Device Independence:

A code written using BMS can run in any terminal type. So the application need not depend on hardware protocol.

Page 16: BMS-I

Format Independence:

The application program need not be changed if there is any change in the screen layout , provided the field name and length remain same.

Page 17: BMS-I

MAPS:

A screen defined through BMS is called a map.

Types of MAPS:

1. Physical Map.

2. Symbolic Map.

Page 18: BMS-I

Physical Map:

The objective of the physical map is to obtain device independence in the application programs.

Physical map defines the maximal length and starting position of each field and allows BMS to interpret input NMDS.

Contd….

Page 19: BMS-I

Physical Map Generation:

The physical map is coded using BMS macros , assembled separately , and linkedited into the CICS load library.

BMS Macro Assembly Linkedit

Load Module Loadlib CICS

Page 20: BMS-I

Symbolic Map:

The primary objective of symbolic map is to ensure device and format independence.

A layout change can be made without affecting the application program.

Contd….

Page 21: BMS-I

Symbolic Map Generation:

Symbolic map are coded using BMS , assembled separately , cataloged into the copy library (COPYLIB) , at the time of compiling , this is copied into the application program.

Page 22: BMS-I

MAPSET:

A group of maps is called Mapset.

Mapset name must be defined in the PPT. This is because CICS considers BMS mapset as a program coded in assembler.

Page 23: BMS-I

MAPSET

MAP1 MAP2 MAP3

MAP4 MAP5 MAP6

MAP7 MAP8 MAPn

Page 24: BMS-I

MAPSET

MAP

Page 25: BMS-I

MACROS:

BMS provides assembler macros as follows:

1. DFHMSD

2. DFHMDI

3. DFHMDF

Page 26: BMS-I

DFHMSD:

This macro is used to define mapset.

Page 27: BMS-I

DFHMDI:

This macro is used to define a map.

Page 28: BMS-I

DFHMDF:

This macro is used to define a field in the map.

Page 29: BMS-I

Mapset definition:

MAPSET1 DFHMSD TYPE=&SYSPARM , X

MODE=INOUT, X

LANG=COBOL , X

STORAGE=AUTO , X

TIOAPFX=YES , X

CNTL=(FREEKB,FRSET)

Page 30: BMS-I

TYPE=

DSECT

MAP

&SYSPARM

For symbolic map.

For physical map.

Assembly Procedure.

FINAL To end a mapset.

Page 31: BMS-I

MODE=

IN: For input map.

OUT: For output map.

INOUT: For input/output map.

Page 32: BMS-I

LANG=

COBOL

ASM

PL1

RPG or

any language which supports CICS.

Page 33: BMS-I

TIOAPFX=YES/NO

Coded ‘YES’ , reserves a prefix space (12bytes) for BMS commands to access TIOA properly.

Page 34: BMS-I

CNTL=

FREEKB: Frees the keyboard.

FRSET: Resets the MDT tag.

ALARM: Gives a beep whenever the map is invoked.

PRINT: Mapset is sent to the printer.

Page 35: BMS-I

TERM=<type>

This is coded , if the application runs on a terminal other than 3270.

This ensures device independence.

Page 36: BMS-I

DFHMDI:

MAP1 DFHMDI SIZE=(24,80), X

LINE=1, X

COLUMN=1 X

JUSTIFY=LEFT

Page 37: BMS-I

24

80

MAP1

Page 38: BMS-I

DFHMDF:

DFHMDF POS=(3,10), X

INITIAL=‘SWBT’, X

ATTRB=ASKIP, X

LENGTH=4

Contd….

Page 39: BMS-I

NAM DFHMDF POS=(6,20), X

ATTRB=(UNPROT,FSET), X

JUSTIFY=RIGHT, X

PICIN=‘9(8)’, X

PICOUT=‘9(8)’, X

LENGTH=8

Page 40: BMS-I

MAP2 DFHMDI SIZE=(24,80), X

LINE=1, X

COLUMN=1, X

JUSTIFY=RIGHT

This will create another map , map2 within the same mapset.

Page 41: BMS-I

DFHMSD TYPE=FINAL

This ends the macro definition. No command should follow after this statement.

Page 42: BMS-I

ATTRIBUTES:

ASKIP PROT

UNPROT NUM

BRT NORM

DRK IC

FSET

Page 43: BMS-I

ASKIP:

AutoSKIP , data cannot be entered into a field with ASKIP attribute. The cursor skips to the next field.

Page 44: BMS-I

PROT:

Protected field. Data cannot be entered into a protected field. Difference between ASKIP and PROT is that in ASKIP the cursor moves to the next field , whereas in PROT field the cursor is not skipped. If the user tries to enter any data in protected field , it will cause the input-inhibit status.

Page 45: BMS-I

UNPROT:

Unprotected field. Here the data can be entered. It must be specified for input fields.

Page 46: BMS-I

NUM:

Numeric field. Only numeric values (0-9) is allowed and special characters (‘.’ & ‘-’) are also allowed. Any alphabetical input will cause the input-inhibit status.

Page 47: BMS-I

BRT:

Bright display , similar to highlight in COBOL.

NORM:

Normal display.

Page 48: BMS-I

IC:

Insert cursor. The cursor will be positioned in the specified field when the map is sent. If IC is specified for all fields the cursor is positioned in the last field.

Page 49: BMS-I

FSET:

Field Set. This is used to set on the MDT.

Page 50: BMS-I

LTITL

Name: XXXXXXXXXXXXXXX

Age:

Department:XXXXXXXXXXXXXX

Salary:

F1-Save F2-Exit F3-Previous

Page 51: BMS-I

Modified Data Tag (MDT):

MDT is a one bit attribute character. It is off (0) when the terminal user has not modified the field.

When the terminal user enters any data in the field the MDT is on (1).

When the MDT is on i.e., 1 , the data is sent from the terminal hardware to the host computer.

Page 52: BMS-I

As a good programming practice , it’s advised to reset the MDT when ever the map is sent to the terminal.

Page 53: BMS-I

How the map variables fit into the application program?

Page 54: BMS-I

The map variables are copied into the application program through the COBOL copy statement.

When the symbolic map is generated , the map variables are created as working-storage variables. For example

02 NAM+x PIC X(8).

where ‘x’ is the suffix. Contd….

Page 55: BMS-I

L Halfword binary PIC S9(4) COMP

F Flag byte. This is for input field , it will have value X’80’ if field has

been has been modified but no data is sent. By default this field is X’00’.

A Attribute byte for I/O fields.

I For input fields.

O For output fields.

Page 56: BMS-I

SKIPPER & STOPPER TECHNIQUES.

Skipper technique is used to improve user friendliness.

Stopper technique is used to avoid overflow of data in the terminal.

Page 57: BMS-I

END OF PART 1