Before you begin, you must complete Exercise 7.8: Switching between multiple records.
Let's put in some error handling for the 'position to employee name' field. If the employee name is not found in the database, the program will set on indicator 60.
In this case the field should turn red, reverse image and position the cursor to it. Now wouldn't it be better if you had something easier to remember than some arbitrary number from 1 to 99.
To set indicators:
The Named indicator sets window opens.
The Not found indicator set is now in effect. The Design area is
shown as if indicator 60 was on and all other indicators were off. The
Design page toolbar shows the current indicator set in the Select named
indicator set list on the bottom left.
The toolbar should look as follows:
Notice that all the new keywords were created with a condition of 60. (The DSPATR(PR) was pasted with the field originally).
The field appears red and reverse imaged.
You have added error handling to the position to employee name field and you are ready to begin Exercise 7.10: Accessing field properties.
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.