Automatic Processing
Automatic processing is done every time a record is accessed from disk. Records are accessed from disk at two times for user interaction, during Request Output and during Inquire, Update, Add. Other times records are retrieved, for example, during index maintenance, there is no need to run any automatic processing.
More specifically, automatic processing is performed once if a record is accessed for output, but several times when a record is displayed on the screen in Inquire, Update, Add.
Automatic processing affects data as it comes from the disk to be displayed on the screen, but it does not, and should not, affect data on its way back to the disk. The automatic table should never change anything on the record
You can use automatic processing for standard processing that is the same every time you access the record, whether in Inquire, Update, Add or Request Output.
Common Uses
Calculating a math formula, without saving it, whenever a record is accessed in Inquire, Update, Add or in Request Output.
Looking up an address from another file using a customer code, so that the address appears on the screen but is not saved in the records of the current file.
There are thousands of good uses for the automatic table. One of its most important features is that it ties together all other tables so that values can be passed through it to them.
Input Processing Tables
Input processing is done on a single record when it is added or updated. The processing is performed after the user presses the SAVE key. (Unix=ESCAPE ESCAPE, DOS=ESCAPE <= this can be customized).
Remember the user may press SAVE in 2 cases, either saving data for a brand new record, or saving updates (changes) to an existing record. Sometimes the programmer will want different things to happen in each of these cases.
Use input processing when you want processing to occur on a record-by-record basis after you add or change data in the records.
Common Uses
Filling in an empty shipping address with the billing address.
Attaching screens to one another so that the user is taken from one screen to the next.
Posting data to another file on a record-by-record basis after the user presses ESC/ESC.
Output Processing Tables
Output processing is performed during Request Output on a selected group of records.
When you Request Output the program performs 2 passes through the file. First, it selects and sorts the records. Then it performs the output processing on each record.
It may or may not include the printing of output. If there is no printout, it is called a "Processing - Only" operation.
Common Uses
Formatting data for special display on the output device.
Accumulating special totals on reports.
Posting data to summary files
Uses of Processing - Only Operations
Mass recalculation - performing a math operation on a field throughout a file.
Global update - performing a textual change throughout a file.
Moving outdated records into archive files.