Let's understand Mainframe
Home Tutorials Interview Q&A Quiz Mainframe Memes Contact us About us

Module 5: CICS BMS and Screens


RECEIVE MAP

What RECEIVE MAP does

  • RECEIVE MAP receives data the user typed at the terminal into the program.
  • The data sits in the CICS terminal input buffer from the moment the user presses an attention key (Enter, PF key).
  • BMS maps the input into the symbolic map's input area using the physical map's field definitions.
  • Only fields with MDT on are transmitted, so the program sees just what the user entered or changed.

Options

  • MAP: the 1-7 character map name. MAPSET: the mapset name - if omitted, the map name is used. The mapset must be defined in the PPT.
  • INTO: the area where the mapped data is placed - if omitted, the map name with an I suffix is used (for example MNTMAP1I).
  • After RECEIVE MAP, check each field's length item (suffix L): 0 means the user entered nothing in that field.
  • The flag field (suffix F) holds hexadecimal 80 if the user modified the field but no data was transmitted.
  • Example:-
    EXEC CICS RECEIVE MAP('MNTMAP1') MAPSET('MNTSET1') INTO(MNTMAP1I) END-EXEC.

The MAPFAIL condition

  • MAPFAIL is raised when the user entered no data at all - nothing with MDT on was transmitted.
  • Prevent it by always including the 1-byte DUMMY field with FSET in the map (see the MDT page).
  • Do not issue RECEIVE MAP when the user pressed the Clear key or a PA key - there is no input map data then.
  • Check EIBAID first (against DFHAID values like DFHENTER, DFHCLEAR, DFHPA1) and handle attention keys before receiving the map.





© copyright mainframebug.com
Privacy Policy
MainframeBug Assistant