=== Automatic Processing === Unless otherwise specified, everything applies equally to Quikstart as to Plus. 1 - When is automatic processing run? Automatic processing is run in dclerk: Whenever a record is displayed on the screen, whether it be by record number, index mode, scan for records, add records, or by pressing the up/down arrow to go from one record to another, or by pressing Enter to display the next match in scan records mode. When the user presses the 'U' key to go into update mode, or any other key for which there is @KEY processing. The record is reread for update and locked before running auto processing. After input processing has finished, and the record has been written and unlocked, automatic processing is run again. After a "lookup dash." Note: In add records mode, the freechain is not unlocked until automatic processing finishes. Automatic processing is not run in dclerk: While viewing records in browse mode. Automatic processing is run in dreport: During the output phase only. Each selected record is read for update and locked, automatic processing is run, then output processing. The record is then printed. The record is then written to disk, if modified, and then unlocked. Automatic processing is not run in dreport: During the selection phase, although sort/select processing, if any, is run. 2 - Modifying real fields in automatic processing. Note: Any changes made to real fields in automatic processing will be displayed on the screen, but will not be written to disk unless you go into update mode. (See also #3 regarding the write statement.) This causes different information to appear in browse mode (when auto processing is not run) and full-screen mode. 3 - Using the "write" statement in automatic processing. Note: This only applies to "write" to the main file. There are no problems with writes to lookups. General rule of thumb: Avoid it if at all possible. Note that after eight years, no one has given me a case where it wasn't possible. First and foremost reason: The record is not locked when automatic processing is run when just displaying the record. Unless you plan never to move beyond single-user DOS, this should be sufficient reason to avoid it. If information needs to be changed whenever the user looks at a record on the screen, it means that the information on disk is out of sync with reality. In other words, your system is out of balance. In this case, you should probably rework the system so that it doesn't go out of balance. Or, perhaps it is not necessary to have the absolute latest value on the screen when you are just looking at it, and recalculate the value only when enterring update mode. In this case, you could run a batch process to re-sync the values periodically. Note: @ENTSEL (4.0) and @MENU (4.1) processing prohibit the use of "write" and "delete." Attempting to do so will give a message that the statement was ignored.