You are on page 1of 45

BASIC MAPPING SUPPORT Z

PART 2

Three Basic Functions of BMS.

1. Map Sending Function.


2. Map Receiving Function.

3. Text Handling Function.

Map Sending Function.

Using the data in the symbolic map , BMS prepares the output NMDS for the corresponding physical map and sends it to the terminal or printer.

Map Receiving Function.

Using the input NMDS from the terminal , BMS prepares data in the symbolic map through the corresponding physical map.

Text Handling Functions.

BMS prepares text without using a map and sends to the terminal.

The following commands are available for I/O operations. RECEIVE MAP - To receive a map.

SEND MAP

- To send a map.

SEND CONTROL - To send a control. SEND TEXT SEND PAGE - To send a text. - To send accumulated text or maps as a logical message.

THE RECEIVE MAP COMMAND

The receive map command is used to receive a map from the terminal. After the completion of this command the symbolic map will contain valid datas from the terminal in the following 3 fields defined by the DFHMDF macro. <fieldname> + L
<fieldname> + F <fieldname> + I

Syntax:
EXEC CICS RECEIVE

MAP(name)
MAPSET(name)

END-EXEC.

Example:
WORKING-STORAGE SECTION. COPY MAPSET1. PROCEDURE DIVISION. EXEC CICS RECEIVE MAP(MAP1) MAPSET(MAPSET1) END-EXEC.

Commonly Used Options:


TERMINAL ASIS : To override the upper case translation defined in the TCT.

Common Errors:

MAPFAIL: This error is occurred when the user presses the enter key without typing data , provided the FSET option is not specified in the DFHMDF macro.

Data Validation in maps: BMS does not check the quality of data entered by the user. The user is supposed to check the quality of data. Since CICS is used in on-line systems , its very vital that the data must be checked instantly. CICS provides facilities for that.

SEND MAP Command:


This command is used to send a map to the terminal. While sending a map , the symbolic map has got the following 3 fields. <fieldname> + L <fieldname> + A <fieldname> + O

Syntax: EXEC CICS SEND

MAP(MAP1)
MAPSET(MAPSET1)

[CURSOR]
[ERASE]

END-EXEC.

Commonly used options: ERASE: This options erases the screen before sending the map. If this option is not specified the map sent will overlap the previous map. This options erases only the unprotected fields when the map is sent.
Contd..

ERASEUP:

FREEKB

: To free the keyboard.

ALARM
FRSET

: Issues a beep.
: To reset the MDT to zero.

DATAONLY : Only application program data is sent to the terminal. MAPONLY : Only the default data from the physical map is sent to the terminal.

SEND CONTROL Command:

The SEND CONTROL option is used by the application program to dynamically establish the device control options without sending the map.

Syntax:
EXEC CICS SEND CONTROL

[CURSOR]
[ERASE/ERASEUP]

[FREEKB]
[FRSET]

END-EXEC.

Cursor Positioning Techniques:


Symbolic Positioning:

In this approach , the cursor is dynamically positioned by placing a -1 in the <fieldname> + L.

Example:

WORKING-STORAGE SECTION. COPY MAPSET1. 01 MAP1I. 05 FILLER PIC X(12). 05 FLD1L PIC S9(4) COMP. 05 FLD1F PIC X. 05 FLD1I PIC X. PROCEDURE DIVISION. MOVE -1 TO FLD1L.
Contd..

EXEC CICS SEND MAP(MAP1) MAPSET(MAPSET1) CURSOR ERASE END-EXEC.

Relative Positioning: EXEC CICS SEND

MAP( . . . . . .)
MAPSET(. . . . . )

CURSOR(150)
ERASE END-EXEC.

Checking Cursor Position:


The cursor position can be known by checking the EIBCPOSN , which is a half word binary S9(4) COMP. This can be checked after the completion of the RECEIVE command. The EIBCPOSN gives the relative position of the cursor at the time of data transfer.

Attribute Character Assignment.


An attribute character defines the characteristics of a field on the screen. The ATTRB parameter of the DFHMDF macro can be altered at runtime through the application program.

Attribute Character format.

The attribute character is a 1 byte (8 bits) of data containing the following bit pattern. BIT Function

0,1 Value determined by the contents of bits 2 to 7. 2 0 : Unprotected

1 : Protected
Contd..

BIT

Function

0 : Alphanumeric
1 : Numeric

2,3
4,5

11 : Autoskip
00 : Normal Intensity/Nondetectable 01 : Normal Intensity/detectable 10 : High Intensity/ detectable 11 : Dark/ Nondetectable

BIT
6

Function
0 : Must be zero

0 : Not Modified (MDT off) 1 : Modified (MDT on)

Standard Attribute Character List

CICS provides the standard attribute character list (DFHBMSCA) in the form of COPYLIB member. This can be included in the application program. It is included in the working-storage section by issuing the COBOL COPY statement.

COPY DFHBMSCA.

Printing through BMS.


For the print operation to be achieved the option PRINT must be specified in the CTRL parameter of the DFHMSD or DFHMDI macro.

Example:
EXEC CICS SEND

MAP(MAPNAME)
MAPSET(MAPSETNAME)

PRINT
NLEOM

END-EXEC.

The NLEOM identifies the New Line and End Of Message and positions the field on the printer page. Whenever an EOM is encountered , the printing stops.
Specifying NLEOM option speeds the printing process by allowing multiple pages to use the same buffer.

Text Handling in BMS.


BMS provides text building functions used for output operations. Through BMS text building function , a text is displayed on the terminal confined to the terminal boundaries i.e., there are no breaks in the words. This implies that , no map is required for sending the text.

Types of text streams


Single text stream Header Body Multi text stream Header Body1

Trailer

Body2
Body3 Trailer

Syntax:

EXEC CICS SEND TEXT


FROM(var1) LENGTH(var2) [HEADER(var3)] [TRAILER(var4)]

[ERASE]
END-EXEC.

Example:
WORKING-STORAGE SECTION. 01 TEXT-HEADER 01 TEXT-TRAILER 77 TEXT-BODY 77 TEXT-LENGTH .. .. PIC X(400). PIC S9(4) COMP.

PROCEDURE DIVISION.
MOVE XXXXXXXXXXXXXXXX TO TEXT-BODY. MOVE 350 TO TEXT-LENGTH.

Contd.

EXEC CICS SEND TEXT

FROM(TEXT-BODY)
LENGTH(TEXT-LENGTH) HEADER(TEXT-HEADER) TRAILER(TEXT-TRAILER) ERASE END-EXEC.

PRINT Option:
If specified , will route the text to the printer rather than displaying it on the terminal. The NLEOM is also recommended. When specifying SEND TEXT command without ACCUM option , care must be taken that the text size does not exceed the terminal size. If it happens , BMS automatically splits the screen and , split screen overrides the actual screen. As a result of this , the user is able to view only partial information.

Multi text Operations.

In several occasions the user might wish to send several paragraphs to the terminal. In such cases all the paragraphs are grouped to form one message (one logical text).
To send multi text two commands are used, SEND TEXT with ACCUM option and

SEND PAGE command.

Example:
WORKING-STORAGE SECTION. 01 TEXT-HEADER

01 TEXT-TRAILER
77 TEXT-BODY1 77 TEXT-BODY2 77 TEXT-BODY3 77 TEXT-LENGTH

PIC X(100). PIC X(200). PIC X(150). PIC S9(4) COMP.

PROCEDURE DIVISION.
MOVE 100 TO TEXT-LENGTH. Contd.

EXEC CICS SEND TEXT FROM(TEXT-BODY1) LENGTH(TEXT-LENGTH) HEADER(TEXT-HEADER) ACCUM ERASE END-EXEC. MOVE 200 TO TEXT-LENGTH.

Contd.

EXEC CICS SEND TEXT

FROM(TEXT-BODY2)
LENGTH(TEXT-LENGTH) HEADER(TEXT-HEADER)

ACCUM
ERASE END-EXEC.

EXEC CICS SEND PAGE

TRAILER(TEXT-TRAILER)
END-EXEC.

LLPCdata-----------------pppp---------------data------------------------------

LL

: Half word binary S9(4) COMP containing length of the data excluding the prefix.

P
C Data pppp

: Character denoting the position of the page number if automatic paging is requested.
: One-byte control field used by BMS. : The actual data of the header : Position and length of the pagenumber if automatic paging is requested.

Common ABENDs.
AEI9 ABMG : : Map fail. Requested BMS service not included at system generation.

ASRA AEY7

: :

Abend due to program interruption. Resource security check failed.

THE END

You might also like