|
|
| Author |
Message |
mfguy
New User
Joined: 31 Jul 2003 Posts: 4
|
|
|
|
hi all,
As I have limited exposure to online programs,Iam raising this
query.How do we check the status of the MDT ,a attribute bit, in a application program ie whether it is 'on' or 'off' ,before issuing receive map command.Suggestions appreciated
Thanks
mfguy |
|
| Back to top |
|
 |
References
|
|
 |
mcmillan
Site Admin
Joined: 18 May 2003 Posts: 932 Location: India
|
|
|
|
| Using the FLAG FIELD (FIELD+F) |
|
| Back to top |
|
 |
DNelsonPNC
EXPERT
Joined: 15 Jun 2003 Posts: 10 Location: North Carolina
|
|
|
|
Why would you want to know if MDT is on before you RECEIVE the map?
The whole purpose of the MDT is to tell the terminal what data it is to send back to the application. When you receive the data, any field that has data in it has the MDT on!
On OUTPUT you set the MDT ON for any data you need the terminal to send back to the APP regardless of the user keying anything in that field. |
|
| Back to top |
|
 |
prakash271082
Active User
Joined: 09 Sep 2005 Posts: 61
|
|
|
|
Hi,
MDT and FSET go hand in hand. To answer your question, How to check whether MDT is on or off? .
As per my knowledge, I would consider an Unprotected field, when I am receiving the map, I would leave that field untouched (i.e left with previous record's value). Now if the Receive operation receives that value ( previous value itself ), I would be confirming that MDT is on.
Another way, it might look silly is that directly seeing the Macro code for FSET option in DFHMDI ( Map definition Macro ).
Any way you can also dynamically make MDT to be on for particular fields by using,
MOVE DFHBMFSE TO XXXA.
where xxx is field label.
A is attribute byte check.
Hope this helps. |
|
| Back to top |
|
 |
doucette222
New User
Joined: 10 Dec 2005 Posts: 2
|
|
|
|
isn't it that a field has length > 0 (symbolic map L field) that tells you its been transmitted and therefore has mdt on? its not just that it 'has data in it' as the field could be blank which i'd consider as no data. blank field may be transmitted if spaced out or erased out i believe. if spaced out i believe the L field will be > 0. if erased out i don't know what L field will be. so that is an exception? in that exceptional case of erased field the F field will have hex 80 in it.
receive the map, then check the 'L' FIELD ON THE SYMBOLIC MAP TO SEE IF FIELD HAS LENGTH > 0. IF IT DOES, THEN PROCEED WITH EDITING ETC FOR THAT FIELD. what to do about the exception of erased field i'm not sure |
|
| Back to top |
|
 |
appasi
New User
Joined: 12 Dec 2005 Posts: 20 Location: Bangalore
|
|
|
|
Hi,
If you receive the field means
MDT is ON for that field , If you
populate the field MDT of that field
automatically gets ON.
While send if you want to make MDT ON
for particular field dynamically then you can use
move DFHBMFSE to xxxxxA. |
|
| Back to top |
|
 |
|
|