Understanding the INPUT instruction
The INPUT
instruction controls a single record input from form
fields.
The INPUT
statement binds program variables to screen-records for data entry in
form fields. The INPUT
statement uses the current form in the current
window. Before executing the INPUT
statement, record data must be fetched
from the database table into the program variables using the input statement.
During the INPUT
statement execution, the user can edit the record fields, while
the program controls the behavior of the instruction with control blocks.
To terminate the INPUT
execution, the user can validate (or cancel) the dialog
to commit (or invalidate) the modifications made in the record.
When the statement completes execution, the form is deactivated.
After the user terminates the input (for example, with the "accept" key), the program must test the
INT_FLAG
variable to check if the dialog was validated (or canceled), and
then can use the INSERT
or UPDATE
SQL
statements to modify the appropriate database tables.