Processing for Each Field
For each field:
- The formula for the field is evaluated if appropriate. Formulas
are evaluated if Apply always is specified, or if clearfirst and
range indicate it should be (see below)
- If the field is to be input, input is solicited repeatedly
until the validation conditions are satisfied, unless a field to
return to on validation failure was specified, or until the user
presses a cursor key to select another field. Before each input the
appropriate input device mask is selected
- If the field is not an input field (or is normally input but
input did not take place because the condition to input was not
satisfied) then the field is displayed or printed as appropriate.
Note that validation conditions on fields are not tested if the
condition to input/display was not satisfied
- Any possible database accesses are performed, as described
under Database
Accesses
- If an access fails, execution passes to another field as
described earlier
- If the procedure is interactive, the field number is set to the
number indicated by the terminal manager. When the terminal manager
sets the field number to zero, however, the Program Interpreter
will process any remaining fields which are outside the input
matrix
The field is totalled, if specified, as described under Execution_of_Totalling .
Field processing is further controlled through two variables:
clearfirst and range.
range is the number of the first field not yet input. clearfirst
is TRUE when a new record is being processed in non database
procedures and before the main table is accessed in database
procedures. Fields are only given their default values before data
entry routines. Non-Apply always formulas are only evaluated when
clearfirst is TRUE and range is less than or equal to the current
field number.
Initial Value
The initial value of any field is the value it had when the
record was fetched from the database or zero if the record is new
to the database. For non database fields, the initial value is zero
for new records or the same as the final value otherwise.