You are on page 1of 11

PROGRAM USING MAPS

"

COBOL CICS command level programs should have the BMS-generated symbolic - map copied into either of their Working-Storage or Linking sections.
SEND MAP RECEIVE MAP

"

PROGRAM USING MAPS


"

TYPES OF SEND MAP COMMANDS


1. SEND MAP AND DATA 2. SEND MAP MAPONLY 3. SEND MAP DATAONLY

"

PROGRAM USING MAPS


" "

" "

"

"

SEND MAP COMMAND Issued to send the physical and/or symbolic map in order to format a terminal screen. Syntax EXEC CICS SEND MAP ('mapname') MAPSET ('mapset name') [FROM(data-name)] [MAPONLY/DATAONLY] [ERASE/ERASEAUP] [CURSOR[(numeric-data-value)]] [FREE KB] [FRSET] [ALARM] END-EXEC.

PROGRAM USING MAPS


"

CURSOR POSITION
There are Two type of cursor position in map they are 1 . STATIC METHOD 2 . DYNAMIC METHOD a) RELATIVE POSITION ( 0 to 1919) b) SYMBOLIC NAME (FieldnameL)

"

" " " "

PROGRAM USING MAPS


"

Modified Data Tag (MDT)


One bit of an attribute character (one for each field),that indicates whether the screen field has been modified or not.

" " "

"
" "

If the field has not been modified by the terminal operator then MDT value become 0 (zero) (OFF state).

PROGRAM USING MAPS


" "

If the field has been modified by the terminal operator then MDT value become 1 (ON state).
MDT

1. Set to ON state 2. Set to OFF state

PROGRAM USING MAPS


"

Set to ON state
a) Static method using FSET option b) Dynamic method using Receive map option

"

Set to OFF state a) Static method using FRSET option b) Dynamic method using Send map option

PROGRAM USING MAPS


" "

RECEIVE MAP COMMAND

Facilitates the accept the symbolic map data from IO device & pass to the application program variable (into the working-storage).
Syntax

" "

EXEC CICS RECEIVE


MAP('mapname') MAPSET('mapset name')

"

[INTO (data-name) ]

END-EXEC.

"
"

Note : After receive map their MDT must be turned on.

HANDLE CONDITION
"

" "

"

Handles various anticipated or unexpected CICS conditions. Syntax EXEC CICS HANDLE CONDITION MAPFAIL(MF-PARA) DUPREC(DP-PARA) NOTFND(NF-PARA) ERROR (ERROR-MESSAGE) END - EXEC. Note : Maximum of 12 condition

"

HANDLE Error Using RESP


"

Example

"
" " "

"
"

ID. PID. ED. DD. WSS. 77 WS-RESP


PD.

PIC S9(8) COMP.

"

" " "

"
"

EXEC CICS RECEIVE MAP(ADDMAP) MAPSET(LAMAP20) RESP(WS-RESP) END-EXEC.

HANDLE Error Using RESP


" " " " " "

IF WS-RESP = DFHRESP(NORMAL) PERFORM ADD-PARA ELSE IF WS-RESP = DFHRESP(MAPFAIL) PERFORM MF-PARA ELSE PERFORM ERR-PARA.

You might also like