Record input / Usage |
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.
Figure 1. INPUT instruction
Figure 2. INPUT instruction with control blocks
Figure 3. INPUT instruction commit or cancellation
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.