My concept regarding MDT is;
When MDT is on (i.e.1) then only data for a particular field (say F1) will be sent to application program from a terminal.
I have two fields on my CICS screen say F1 and F2.
Using programing I am changing the attribute byte of F2 but not changing Attribute byte of F1 and issuing SEND MAP command (without DATAONLY option) and screen has been displayed on the terminal.
Now my question is;
Now, when I press Enter and receive the MAP in program.;
Then what will be Attribute of F1 and F2 (will it be same what program sent or will it be same as while defining the MAP)
I am asking this question because
For F1 while defining BMS map MDT is ON, but program is moving X’00’ in F1+A.
For F2 while defining BMS map MDT is ON, but in program is moving X’E5’ in F2+A
So I am not sure which Attribute will be in effect when I receive the MAP in program.
Please guide me.
Joined: 06 Jun 2008 Posts: 8570 Location: Dubuque, Iowa, USA
Think of the map value as the default value. You can override this value in two ways:
1. Change the field attribute in your program before you send the map
2. Change the data in the field
In the first case, what the map contains won't matter -- what will matter is what you changed the attribute byte to (and whether or not the data in the field was modified, of course).
In the second case, changing the data means you'll get the field data back when you do the RECEIVE MAP -- even if the MDT was cleared in the program.
The attribute in effect when you do the RECEIVE MAP depends upon several things -- what the default attribute in the map is, whether or not you have changed it in the program, and finally whether or not the data in the field was changed and thus forcing the attribute byte to be changed.
The MDT (Modified Data Tag) is the 7th bit in the Attribute byte. Any data entered into an unprotected field even a blank will cause the MDT to be set to 1 and therefore the Attribute byte will reflect that there is data in this field.
When the RECEIVE MAP is issued BMS will retrieve those fields where the MDT has been set to 1 and as such this data will read into the 'I' side of your Cobol 01 level...MAPNAMEI
Of course the program can set the MDT on the SEND MAP and BMS will send this data back even if it's a protected field on the screen. This is needed when you dont want the User to enter any data into the field, but you still want the data back for editing.
So remember even if there is only 1 MDT turned on, the RECEIVE MAP will NOT cause Mapfail exceptional condition.