HP 3000 Manuals

CHANGE FORMS 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

CHANGE FORMS FILE 

In the ORDFORM1 forms file, the ORDER form, as shown in Figure 7-1,
contains customer information plus one line on which an order can be
entered.  This restricts each order to one part number--a more practical
design is to have multiple order lines as well as the customer
information.  In this exercise you separate the ORDER form into two
forms, one called ORDER_HEAD, that contains all the customer information
from the ORDER form, and another form called ORDER_LINE, that contains
only the line with order information.  You define the ORDER_HEAD form as
frozen and the ORDER_LINE form as a repeating form appended to itself.
The result, when you run ENTRY, is that the customer information is
frozen on the screen with order lines appended to it each time the user
adds an order.

Since the ORDER_LINE form is repeated, new data can be entered until
there are no more parts to order.  At that point, the user terminates the
repeat by pressing NEXT FORM in ENTRY. Although the next form is
identical to the existing TOTALS form, in this exercise let's give it a
new name (ORDER_TOTALS) to be consistent with the form names for the two
versions of the ORDER form.  The result of redefining the forms is a file
with three forms:

ORDER_HEAD       Contains the order number, date, customer name, and
                 address, and headings for the order line (same as the
                 ORDER form except the order line is omitted).

ORDER_LINE       Contains fields in which to enter quantity, part number,
                 description, unit price, and total price of a single
                 part (order line from the ORDER form).

ORDER_TOTALS     Contains totals for entire order (identical to the
                 TOTALS form).

Using FORMSPEC, you can copy forms within an existing file or to a new
forms file.  Therefore, rather than typing in the two forms, ORDER_HEAD
and ORDER_LINE, let's copy the ORDER form twice within the ORDFORM1 forms
file.  You can then modify the two copies of the ORDER form and give the
TOTALS form a new name, ORDER_TOTALS.

Since forms are kept in alphabetical order in the forms file, the
ORDER_HEAD form will be the first form in the file.  By default, the
first form is treated as the head form and is the form displayed first by
ENTRY.

[]
Figure 7-2. The Main Menu


MPE/iX 5.0 Documentation