Sorry. This topic was discussed several times however I didn't get the answer that I wanted.
For knowing whether the map variable has changed or not, it was told to check the attribute field 'L' > 0 and also 'F' = X'00' or X'02'. My reqt is that the screen will be populated with data when it loads at first. Then if the user changes any of the field, I need to save it else do nothing. Since the screen gets populated with data, the attribute field 'L' will be always > 0 and the 'F' attribute will be always '00'. Even if the user changes the data or not, this attribute values remains the same (L will be > 0 and F will be X'00' or X'02').
Is there any other way that I can know whether the values have changed other than checking with COMMAREA ?
1) tell us what frigging answer You want so we shall stop wasting time
2) get another ibmmainframes userid so You can self ask and reply in the most agreable way
- against the rules, but if You keep a low profile nobody will be able to notice
3) hire a consultant smart enough to give only the answers which please You
- the fee might be higher than usual for such a requirement
- I said smart, not competent
as I see it only options 2 and 3 are viable,
nobody with a bit of good sense will lend himself, without a proper fee,
to cutting and pasting stupid/incompetent/wrong/useless answers just to please You
the answer ...
check the length
is the common practice and appropriate one,
and confirmed by the manual ...
188.8.131.52 Modified data
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 You cannot achieve what You want by following the standard and documented approach
something in Your code is just plain wrong
if the problem persists review Your training,
if the problem still persists a career switch might be appropriate
the tone of the answer ( and I am sure You will complain about it ) is the one that should be expected for remarks like the quoted one
Joined: 06 Jun 2008 Posts: 8214 Location: Dubuque, Iowa, USA
Since the screen gets populated with data, the attribute field 'L' will be always > 0
The manual quote Enrico provided proves that your comment is completely WRONG -- unless the MDT is set, the length field will be zero unless the data was changed by the terminal operator. Since you are starting with wrong assumptions, and you know the answer you want, why bother with a forum? We will not validate wrong answers for you.