IBM AS/400 Frozen Dessert Maker User Manual


 
File Maintenance
change the mode of processing by pressing F5 (ADD), F6 (UPDATE), F7
(DELETE), or F8 (DISPLAY).
To add a new record to the file, the program uses the customer number as the
search argument to chain to the master file. If the record does not exist in the file,
the program displays the CSTBLD screen to allow the user to enter a new cus-
tomer record. If the record is already in the file, an error message is displayed. The
user can press F12, which sets on indicator 12, to cancel the add operation and
release the record. Otherwise, to proceed with the add operation, the user enters
information for the new customer record in the input fields and writes the new
record to the master file.
To update, delete, or display an existing record, the program uses the customer
number as the search argument to chain to the master file. If a record for that cus-
tomer exists in the file, the program displays the customer file inquiry screen
CSTINQ. If the record is not in the file, an error message is displayed. If the mode
of processing is display or delete, the input fields are protected from modification.
Otherwise, to proceed with the customer record, the user can enter new information
in the customer record input fields. The user can press F12, which sets on indicator
12, to cancel the update or delete operation, and release the record. Display mode
automatically releases the record when Enter is pressed.
In Figure 176, the workstation user responds to the prompt by entering customer
number 00007 to display the customer record.
DISPLAY MODE
22:30:21 CUSTOMER FILE MAINTENANCE 9/30/94
00007 <--Enter Customer Number
F3 End Job F5 Add F6 Update F7 Delete F8 Display
Figure 176. 'Customer File Maintenance' Display Mode prompt screen
Because the customer record for customer number 00007 exists in the Master File,
the data is displayed as show in Figure 177 on page 356.
Chapter 19. Example of an Interactive Application 355