Code Comments
Programming Forum and web based access to our favorite programming groups.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
Post Follow-up to this messagenews.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 progra m >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
Post Follow-up to this messageHi ... have you tried using the MODIFY verb? It can change several attributes and s tyles 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.
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.