Confusion about MDT byte



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

Confusion about MDT byte

Postby Pumpkin » Wed Oct 12, 2011 3:38 pm

hello,friends
i have a confusion about MDT byte when i am learning cics programing. i think the input field in the map will pass to program when MDT is on and is not low-value. but when i leave the input field unchanged, and press enter again,i think the MDT should be off,because i didn't change anything, but the same value still can pass to program, what is wrong here, and is there some way to test MDT value, thanks a lot!
-------------------
Pumpkin
Pumpkin
 
Posts: 55
Joined: Sat Mar 05, 2011 9:12 am
Has thanked: 0 time
Been thanked: 0 time

Re: Confusion about MDT byte

Postby Robert Sample » Wed Oct 12, 2011 4:40 pm

First, be aware that FSET plays a role -- from the CICS Language Reference manual:
FSET
specifies that the modified data tag (MDT) for this field should be set when the field is sent to a terminal.

Specification of FSET causes the 3270 to treat the field as though it has been modified. On a subsequent read from the terminal, this field is read, whether or not it has been modified. The MDT remains set until the field is rewritten without ATTRB=FSET, or until an output mapping request causes the MDT to be reset.

Either of two sets of defaults may apply when a field to be displayed on a 3270 is being defined but not all parameters are specified. If no ATTRB parameters are specified, ASKIP and NORM are assumed. If any parameter is specified, UNPROT and NORM are assumed for that field unless overridden by a specified parameter.


And from the Application Programming Guide manual:
As we explained in "Modification" in topic 4.4.5.2, 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 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" in topic 6.5.7 for more information about the flag subfield.

If the length is nonzero, data was read from the field. Either the operator entered some, or changed what was there, or the field was sent with the MDT on. You may find the data itself in the corresponding input (I) subfield. The length subfield tells how many characters were sent. A 3270 terminal sends only non-null characters, so BMS knows how much data was keyed into the field. Character fields are filled out with blanks on the right and numeric fields are filled on the left with zeros unless you specify otherwise in the JUSTIFY option of the field definition. BMS assumes that a field contains character data unless you indicate that it is numeric with ATTRB=NUM. See DFHMDF in the CICS Application Programming Reference for details of how these options work.
So merely not changing the field does not necessarily mean the field data is not received by your program.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Confusion about MDT byte

Postby Pumpkin » Wed Oct 12, 2011 5:44 pm

thanks, Robert.
i check my map, the input field ' attrb=(norm,unprot), didn't specify the fset parameter. so is there other possible reason can cause it ? thanks
-------------------
Pumpkin
Pumpkin
 
Posts: 55
Joined: Sat Mar 05, 2011 9:12 am
Has thanked: 0 time
Been thanked: 0 time


Return to CICS

 


  • Related topics
    Replies
    Views
    Last post