View previous topic :: View next topic
|
Author |
Message |
vinu78
Active User
Joined: 02 Oct 2008 Posts: 179 Location: India
|
|
|
|
Hi,
I have a CICS screen wherein I will be entering an Option (1,2,3) for a record. This field will be unprotected for the first record and for subsequent records (on pressing F7 / F8), this Option field should get protected. I have did that but my concern is
I have Edit check to see whether Option value is 1,2,3. Once I am into second record, the Option of first record (that is already validated uding edit check) is copied to the second but the edit check is throwing error since this field is protected and value is not retrieved. Ideally I dont need to do edit check for second record but is there a way to skip the edit check based on the attribute.
Also Is there any way I can check whether a field is protected or not.
IF OPTIONA IS DFHBMPRO (some thing like that)
Thanks
Vinu |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Protected allows a user to TAB to the field, whereas, Autoskip does not. In either case, they can't enter any data.
Check IBM copybook DFHBMSCA (in the CICS SDFHMAC library), but DFHBMPRO sounds correct for Protected. DFHBMASK is for Autoskip.
I've used Protected as the attribute of the last map-field as this will prevent a user from "Wrapping Around" and writing-over the map-data which they've already entered, especially when they let their fingers do the walking and don't raise their head to see where they're at.
Bill |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
normally one uses part of the dfhcommarea to maintain control flags indicating
what am i doing
where was I
what should I do
etc.... |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
in this case You might want to turn on also the MDT attribute, so that the field
will be read back at the next input operation
I remember a customer who would use a dark autoskip mdt field in the map as a scratchpad area ... for quite a few bytes, more than 100 , IIRC
luckily the terminals were local terminals only ! |
|
Back to top |
|
|
vinu78
Active User
Joined: 02 Oct 2008 Posts: 179 Location: India
|
|
|
|
Thanks all for the suggestion.
I tried searching the documents and I was not able to find out a syntax which can check in the module whether a field is protected or not ?
I am not sure whether we can have a IF conditon check for a field's attribute.
Thanks
Vinu |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
You can check before you do a send but you can't check after after a receive. Maintain a variable in the commarea or a hidden field in the map to keep track of such things. |
|
Back to top |
|
|
vinu78
Active User
Joined: 02 Oct 2008 Posts: 179 Location: India
|
|
|
|
Hi Craq,
Thanks for the suggestion. I will try this method. I will keep a flag which will be set whenever I protect this field.
The main problem that happened is that, since I am not typing the Option number value for the second record, the RECEIVE command didn't retrieve the Option number value (but I can see this in screen since this is copied from Commarea of previous record).
So I believe that, whenever we enter something on the screen only, we will get it on RECEIVE. In my case, since the value is copied from previous record and the field being protected, I am not getting it in RECEIVE.Whether my understanding is right or am I doing something wrong in the code?
Thanks
Vinu |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
As enrico suggested, you might want to investigate (in the manual) the use of the MDT (Modified Data Tag) attribute. |
|
Back to top |
|
|
|