MDT and its usage in CICS with examples

Modified data Tag (MDT) is the most important feature in CICS programming consisting of MAPS. One who involves in CICS programming needs to know the importance of it for efficient coding.

It is stored in 7th bit of a attribute byte of a screen field with either ‘0’(OFF) or ‘1’ (ON) as the values.(Every input and output field of a map consists of a one byte attribute field which holds the display, protection and modification attributes).

It is vital in transmitting the data between terminal and program as CICS hardware transmits only the fields with MDT is ON. MDT of a field gets automatically set to ON by the 3270 hardware, if it gets changed by the user on the screen.

In case only one field on the screen is updated, then underlying program receives only that field with receive map macro and is not ideal as the program might need other screen fields as well for the its processing.

So to traverse this, while sending the MAP in program, programmer needs to understand which all are the fields that are required to be back to the program for further processing. All those fields MDT needs to be set to ON programmatically even though those fields may or may not be updated.

Modified Data Tag is crucial to avoid MAPFAIL error as in there are cases where none of the screen fields get modified and if program tries to receive the MAP with no updated fields, it gives MAPFAIL error.

Carefully choosing the fields for processing (to set this Tag ON) gives better performance and it is Programmer/Designer responsibility to design the program considering the above factors.

Example :

CUSTOMER MAINTANANCE
 CUST NUMBER:_____________________

NAME ___________________________

AGE _________

ADDRESS ___________________________

PF1=HELP PF3=EXIT PF5=UPDATE PF6=NEXT CUSTOMER

In the above screen, CUSTOMER NUMBER is the input field and based on that program retrieves the remaining fields. As an example if operator wants to modify the address of a screen for a customer

CUSTOMER MAINTANANCE
 CUST NUMBER:___00001_____________

NAME _______REDDY_____________

AGE __35_____

ADDRESS __TELANGANA________________

PF1=HELP PF3=EXIT PF5=UPDATE PF6=NEXT CUSTOMER

If the fields address is modified and pressed AID – PF5 for the update. Then if the program did not set the MDT ON for the required fields, then only the address fields would be sent to the program which is not the ideal case for further processing as program needs other fields like customer number, name as well.

Ways of Setting/resetting Modified Data Tag :

– In Definition of the field, use FSET attribute to set to ON as given in below example.

Example : ATTRB=(ASKIP,BRT,FSET).

– When the operator modifies any field, ‘Modified Data Tag’ is set to ON automatically by the 3270 hardware.
– Modify by changing the attribute field pragmatically.

Resetting:
-FRSET is used to reset it.
-It can used used in DFHMSD & DFHMDI. All the fields belongs to that map gets reset.
-Any FSET in field level will override the FRSET effect if both are present.

Example:
 DFHMDI SIZE=(024,080),LINE=001,COLUMN=001, CTRL=(FREEKB,ALARM,FRSET), TIOAPFX=YES

Add a Comment

Your email address will not be published. Required fields are marked *

Close Bitnami banner