DELETE RECORDS FROM BATCH FILE [ USING VPLUS/V AN INTRO. TO FORMS DESIGN Self-Paced Training Guide ] MPE/iX 5.0 Documentation
USING VPLUS/V AN INTRO. TO FORMS DESIGN Self-Paced Training Guide
DELETE RECORDS FROM BATCH FILE
To delete a record from the batch file, you must be in Browse mode.
Then, you locate the record to be deleted and press DELETE REC. The
record is effectively deleted from the batch file and can no longer be
referenced. This means if you try to view it in Browse mode, it is
skipped. Furthermore, the space in the file that was occupied by the
deleted records is no longer available. You cannot delete a record and
then insert a new record in that location; all new records are added to
the end of the batch file.
In our example, anywhere from three to nine records may comprise a single
order depending on the number of records generated from the repeating
form. Thus, if you want to delete an order, you must delete all the
records in the order. You can, of course, delete single records from an
order, but if the deleted record affects the total price, you must then
manually change this total on the last form of the order and then press
ENTER to record the changed total.
Since in most cases you want to delete an entire order rather than a
single record in that order, this exercise gives an example that deletes
order number 100001, the first order in the current batch file.
Action
To delete this order, first go to Browse mode by pressing BROWSE. Then
press FIRST REC to find the first record in the file. In this case, it
is also the first record of the order to be deleted. The record appears
as shown in Figure 7-29.
Figure 7-30. Browse Mode, Record No. 2
Action
When you press DELETE REC, the screen is cleared and the next record in
sequence is displayed, as shown in Figure 7-30. Since Record #2 is part
of order number 100001, press DELETE REC to delete it.
Figure 7-31. Browse Mode, Record No. 3
When it is deleted, it is replaced by the next record in sequence, as
shown in Figure 7-31.
Action
Delete this record as well.
Figure 7-32. Browse Mode, Record No. 4
The next record is then displayed, as shown in Figure 7-32.
Action
Delete Record #4 in the same way.
When you delete Record #4, you have deleted the entire order number
100001. Should you wish to enter another order for this company, it is
added to the end of the existing orders with new record numbers and a new
order number.
Action
The exercise is complete; press EXIT.
MPE/iX 5.0 Documentation