MDT flag



Support for CICS/ESA, CICS/TS & Transaction Gateway, CICS Configuration Manager and CICS Performance Analyzer

MDT flag

Postby yashmys » Mon Oct 08, 2012 11:42 pm

I need some assistance regarding the modified flag.

There is a field on the screen that is having data on the screen. While sending the map again, I am setting the mdt flag off. Upon receiving the map, the length of this field is equal to the maximum field length and it contains the low values. But I have not modified the field. I was expecting the value of the length to be zero since I have not modified the field. Assuming the mdt flag has been set, in that case the the value sent back should not be having low values...

thanks,
yash
yashmys
 
Posts: 3
Joined: Mon Oct 08, 2012 11:13 pm
Has thanked: 0 time
Been thanked: 0 time

Re: MDT flag

 

Re: MDT flag

Postby Robert Sample » Mon Oct 08, 2012 11:54 pm

This quote, from 3.2.8.2.1 of the CICS Application Programming Guide manual, should make it clear that there are a variety of ways in which the MDT can be set -- so it is entirely possible that you are setting it without knowing that you have set it:
The MDT for a field is normally turned on by the 3270 hardware when the user enters data into a field. However, you can also turn the tag on when you send a map to the screen, either by specifying FSET in the map or by sending an override attribute byte that has the tag on. You should never set the tag on in this way for a field that is constant in the map, or for a field that has no label (and is not sent to the program that receives the map).
Robert Sample
Global moderator
 
Posts: 3130
Joined: Sat Dec 19, 2009 8:32 pm
Location: Bellevue, Iowa
Has thanked: 1 time
Been thanked: 185 times

Re: MDT flag

Postby yashmys » Tue Oct 09, 2012 10:27 am

Robert,

Thanks for the reply. But even if the flag is set, the field value should be value on the screen and not the LOW-VALUES...that is what is baffling me.

Thanks,
Yash
yashmys
 
Posts: 3
Joined: Mon Oct 08, 2012 11:13 pm
Has thanked: 0 time
Been thanked: 0 time

Re: MDT flag

Postby Monitor » Tue Oct 09, 2012 11:18 am

Thoose kind of problems normaly stem from programming errors.
If you want further assistance, you must post your program code, the whole code, and not just what you think is the important code.
When the MDT is set off, the L-variable is 0 after the Receive, and whats in the I-variable is to be condidered invalid, and the value depends on whether your I-Map is initialized or not.
Monitor
 
Posts: 98
Joined: Wed Jan 18, 2012 8:59 pm
Has thanked: 0 time
Been thanked: 7 times

Re: MDT flag

Postby Robert Sample » Tue Oct 09, 2012 5:16 pm

Your problem is that you have NO understanding of CICS maps. From the CICS Application Programming Guidein chapter 29, you can read that what you are seeing is normal and expected behavior (emphasis added):
Modified data
As we explained in “Modification” on page 305, a 3270 screen field is considered
modified only if the “modified data tag” (MDT), one of the bits in the field
attributes byte, is on. The terminal hardware turns on this bit if the operator
changes the field in any way—entering data, changing data already there, or
erasing. You can also turn it on by program when you send the map, by including
MDT among the ATTRB values for the field. You do this when you want the data
in a particular field to be returned even if the operator does not change it.
You can tell whether there was input from a particular map field by looking at the
corresponding length (L) subfield. If the length is zero, no data was read from that
field. The associated input (I) subfield contains all nulls (X'00'), because BMS sets
the entire input structure to nulls before it performs the input mapping operation.

The length is zero either if the modified data tag is off (that is, the field was sent
with the tag off and the operator did not change it) or if the operator erased the
8. CICS provides an option, BUFFER, for the terminal control RECEIVE command, with which you can capture the entire contents
of a 3270 screen. See “Reading from a 3270 terminal” on page 314 if you need to do this.
field. You can distinguish between these two situations, if you care, by inspecting
the flag (F) subfield. It has the high-order bit on if the field contains nulls but the
MDT is on (that is, the operator changed the field by erasing it). See “Finding the
cursor” on page 351 for more information about the flag subfield.
Robert Sample
Global moderator
 
Posts: 3130
Joined: Sat Dec 19, 2009 8:32 pm
Location: Bellevue, Iowa
Has thanked: 1 time
Been thanked: 185 times


Return to CICS