Module 5: CICS BMS and Screens
MDT
What is MDT
- MDT stands for Modified Data Tag. It is bit 7 of the attribute byte.
- The terminal sets it to 1 when the user types data into the field (or modifies it).
- On RECEIVE MAP, only fields with MDT on are sent back to the program - untouched fields are not transmitted.
- This keeps the input data stream small and tells the program exactly which fields the user touched.
The FSET option
- Coding FSET in ATTRB turns the MDT on before the map is sent to the terminal.
- The field's contents are then transmitted back even if the user did not change them.
- Use FSET on display-only fields whose values the program needs back - for example a customer number shown for reference.
- Do not code FSET on every field, or RECEIVE MAP will return all fields and you lose the 'what changed' information.
- A field holding hexadecimal zeros (low-value) is never transmitted, even with MDT on.
The DUMMY field trick
- The last DFHMDF in a map should define a 1-byte field named DUMMY with ATTRB=(DRK,PROT,FSET) and INITIAL=' '.
- DRK and PROT make it invisible and unchangeable; FSET guarantees its MDT is on.
- This ensures at least one byte is always sent back, so RECEIVE MAP never raises the MAPFAIL condition.
- In the symbolic map it appears as DUMMYL / DUMMYF / DUMMYA / DUMMYI / DUMMYO like any named field.
- Example:-
DUMMY DFHMDF POS=(24,79), X
LENGTH=1, X
ATTRB=(DRK,PROT,FSET), X
INITIAL=' '
MainframeBug Assistant