Dialog instructions / Record input (INPUT) |
The INPUT statement binds program variables to screen-records in forms 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 by 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.