Home > Archive > Cobol > October 2004 > COBOL Screen Question
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
COBOL Screen Question
|
|
| news.gvtc.com 2004-10-05, 3:55 am |
| I have a screen section within an Acucobol program that has fields defined
as input/output (i.e. Using). I would like to dynamically within the program
code 'Protect' a field from the user entering in data and then unprotect it
later on. I can't find or figure out how to do this.
Has anyone done this? Can any share their experiences/solutions?
thanks.
Doug
| |
| James J. Gavan 2004-10-05, 3:55 pm |
| news.gvtc.com wrote:
>I have a screen section within an Acucobol program that has fields defined
>as input/output (i.e. Using). I would like to dynamically within the program
>code 'Protect' a field from the user entering in data and then unprotect it
>later on. I can't find or figure out how to do this.
>
>Has anyone done this? Can any share their experiences/solutions?
>
>thanks.
>Doug
>
>
>
Seems to me you are pushing your luck on this one - you are trying to
emulate the Windows "disable", "enable" or "readOnly".
Don't know your compiler but does it allow you to (1)ACCEPT WHOLE SCREEN
v (2)ACCEPT THIS FIELD. Given (1) - segment your ACCEPT to ACCEPT
SUB-SCREEN (the majority), and programatically (2)ACCEPT THIS FIELD.
Presumably when it comes to changing, you are prompting user for the
Field-Number to be changed. If it is one you currently want to 'protect'
- an error message, "Can't change this right now....".
I would have thought your choices are pretty limited - check out the
AcuCOBOL full screen syntax, addressing each 'word' to see if there's
something hidden behind the general name. (I've just checked the Micro
Focus Screen Section which is COBOL 2002 PLUS extensions - and I don't
see anything there allowing a 'protect').
Jimmy, Calgary AB
| |
| davidk13 2004-10-28, 4:29 pm |
| Hi ...
have you tried using the MODIFY verb? It can change several attributes and styles of a control (whether regular or OCX).
This statement will ste the read-only attribute on, but I haven't found how to take it off ...
MODIFY MY-SCREEN-FIELD READ-ONLY
I can't set that attribute to false or 0, so I'm not sure how to cancel it. But this is a starting point.
Hope it helps.
..DaviD. |
|
|
|
|