Getting Started with TRANSACT (32247-90007)
90 Chapter5
Automatic Error Handling and Prototyping
Figure 5-8 will help you see how automatic error handling can work for you.
In this version, lines 4.8 and 4.9 have been added to verify that the order now being
entered does not already exist. The NOFIND option on line 4.9 specifies that it is not an
error if a record is not found. It is an error if a record is found. If the error occurs,
automatic error handling will display a message and restart at the data collection point,
which is line 4.
Lines 4.91 and 4.92 verify that the customer already exists. If not, the program is restarted
at line 4 after displaying the error message.
Lines 9.8 and 9.9 validate the part number. If the part number does not exist, the program
is restarted at the last data entry point which is line 9.
The examples below illustrate the messages generated by the automatic error facility
when there are errors, such as:
• order already exists
• customer is invalid
• part number is invalid
Figure 5-9. Automatic Error Handling, Duplicate Record
Figure 5-10. Automatic Error Handling on Frozen Screen
vorderhead order data
order number [123 ] customer [1 ] status [0 ] date [850101]|
*ERROR: ENTRY ALREADY EXISTS (IMAGE 1,23,ORDER)
vorderhead order data
order number [124 ] customer [987 ] status [0 ] date [850101]|
*ERROR: NO ENTRY FOUND (IMAGE 17,27,CUSTOMER)