SEND MAP command send the formatted output data to a terminal. It is also used to send the map to the mainframe terminal from the application program.
Below is the syntax for CICS SEND MAP command.
EXEC CICS SEND MAP('map-name') MAPSET('mapset-name') [FROM(data-area)] [LENGTH(data-value)] [DATAONLY] [MAPONLY] [FREEKB] [FRSET] [ERASE/ERASEAUP] [CURSOR] END-EXEC.
Let us see the parameters used in the SEND MAP command.
Specifies the name of the map to be used.
Specifies the name of the mapset to be used. It is needed unless mapset name is the same as the map name.
Specifies the data area containing the data to be processed.
Specifies the length of the data to be formatted as a halfword binary value. If the data area sending the map is longer than the data to be mapped, LENGTH should be specified.
Specifies that only default data from the map is to be written.
Specifies that only application program data is to be written(i.e. Only the data from your program is sent to the screen). Any default data or attributes from the map are ignored.
Keyboard should be unlocked after the data is written in screen. If FREEKB is not added, the keyboard remains locked.
Flag Reset turns off the modified data tag(MDT) in the attribute byte for all the fields on the screen before what you are sending is placed there.
This is used to clear the map on the screen when sending any map.
This is used to clear the previous value on the screen when sending thee data only.
This is used to position the cursor on the screen. Cursor is set by moving -1 to the L part of the field and then sending the map.
The following example shows you how to send map only to the screen.
EXEC CICS SEND MAP('map-name') MAPSET('mapset-name') FROM(MAPNAMEO) ERASE END-EXEC.
The following example shows you how to send data only to the screen from 'MAPNAMEO' variable.
EXEC CICS SEND MAP('map-name') MAPSET('mapset-name') FROM(MAPNAMEO) DATAONLY END-EXEC.
If you have any doubts or queries related to this chapter, get them clarified from our Mainframe experts on ibmmainframer Community!