Professional Documents
Culture Documents
PART 2
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.
Using the input NMDS from the terminal , BMS prepares data in the symbolic map through the corresponding physical map.
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 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.
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.
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
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.
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.
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..
MAP( . . . . . .)
MAPSET(. . . . . )
CURSOR(150)
ERASE END-EXEC.
The attribute character is a 1 byte (8 bits) of data containing the following bit pattern. BIT Function
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
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.
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.
Trailer
Body2
Body3 Trailer
Syntax:
[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.
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.
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
Example:
WORKING-STORAGE SECTION. 01 TEXT-HEADER
01 TEXT-TRAILER
77 TEXT-BODY1 77 TEXT-BODY2 77 TEXT-BODY3 77 TEXT-LENGTH
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.
FROM(TEXT-BODY2)
LENGTH(TEXT-LENGTH) HEADER(TEXT-HEADER)
ACCUM
ERASE END-EXEC.
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
: :
THE END