COBOL question, accept/display
This is a how-to COBOL question. We run acu-cobol with a customized runtime that includes a C routine for a custom form/screen handler. We are in the process of converting our source code to use accepts & displays instead of our custom forms routines.
In our old routines, if you choose to edit an alphanumeric field, we display the current value of the field & let the user type over it. To change a field with the value "WASHINGTON", you could type the word "ADAMS" & press enter and all characters after ADAMS were erased. When we do the same action using accept/displays, the trailing letters are not erased when you press enter, and you are left with the value "ADAMSNGTON". Is there any way around this, other than simply resetting the field to spaces before entry?
RE: COBOL question, accept/display
You can use the notify-change property of an entry field. Each time the person enters a character, you would have a notify-change event, you could count the numbers of entries thay make and they when the enter key is used (or whatever method they use to leave the field) you could use reference modification to ascertain their entry