HP 3000 Manuals

FORMS FILE [ HP Data Entry and Forms Management System (VPLUS/V) ] MPE/iX 5.0 Documentation


HP Data Entry and Forms Management System (VPLUS/V)

FORMS FILE 

The forms file consists of "global" specifications that apply to all
forms in the file, followed by the individual forms specification.
Within each form specification, the form is identified, and its form
layout is defined.  The form layout defines each field into which data
can be entered.  Each of these different types of specification is
entered on a menu displayed by FORMSPEC. (Refer to Figure 3-12 for an
illustration of a prototype forms file.)

Forms Modification 

At any time during forms design, you can change any form or field
currently specified in the forms file.  The function keys or the Main
Menu allow you to return to any existing form or field specification.
You can then simply change the field or form and press ENTER. The new
specifications override those previously entered.  Refer to "Ease of
Forms Design" earlier in this section.

Another method of modifying a form file is to use the delete option on
Main Menu.  This option allows you to delete an entire form or to delete
fields global to all forms (save fields).  When you delete a form, be
sure to modify any other form that references the deleted form.  For
example, if FORM2 is given as the next form name for FORM I, and FORM2 is
deleted, you must change the next form name specification on the menu for
FORM1.  Note that when you delete a parent form, all child forms of that
form family will be deleted also.  Refer to the "Main Menu" menu
description and the "Form Families" discussion for more information.

The copy option on the Main Menu provides yet another method of modifying
a form file.  This useful option allows you to copy an entire form from
the current forms file or from another forms file.  The copied form is
created by FORMSPEC as a new form that is an exact replica of the
existing form.  The form being copied must be given a name unique to the
current forms file.  The copied form can then be displayed and modified
to suit your design.

The copy option does not copy save fields from one file to another; you
must recreate the necessary save fields if you copy a form from a forms
file other than the current file.  Also, form family relationships are
not maintained when forms are copied from one file to another.  You may
re-establish form family relationships using the relate option on the
Main Menu.  Refer to the "Main Menu" description for more information.

Most of the modifications can also be made using FORMSPEC in batch mode.
(See Section 7 for more information.)

Forms File Size 

FORMSPEC indicates what percentage of the forms file is full whenever the
Main Menu is displayed from the Forms File Menu.  The percentage is
determined by the formula:

     file EOF / file limit

This message is designed to give the user an idea of the space utilized
in the forms file.  Since a single forms file can contain an essentially
unlimited number of forms (subject to system constraints), the forms file
may reach its end-of-file (default=4000 records).  When the percentage
indicated on the Main Menu grows large, you should increase the size of
your forms file, as described below.

[]
Figure 3-12. Forms File Prototype Expand Forms File When you require the forms file to be larger than the default limit of 4000 records, you may override the FORMSPEC default size to create a new forms file using the MPE :FILE command. The :FILE command must be issued prior to the :RUN command to initiate FORMSPEC. Another method is to use the MPE :BUILD command to create a larger file and then use FCOPY to copy an existing forms file into the larger file. To use the :FILE command to create a forms file named ORDFORM, issue the file equation: :FILE ORDFORM;DISC=6000 ^ desired disc space, in number of records Run FORMSPEC and specify ORDFORM as the forms file. You now have an empty file with room for 6000 records, into which you may add or copy forms using the FORMSPEC Main Menu options. Note that the FORMSPEC copy Main Menu option will not copy save fields from other forms files or maintain form family relationships across forms files. You may re-establish form family relationships using the FORMSPEC relate Main Menu option. Refer to the "Main Menu" description for more information. To use the :BUILD command to expand your forms file, ORDFORM, give the following command: :BUILD ORDFORM2;DISC=6000;REC=128,1,F,ASCII;CODE=VFORM ^ desired disc space Run FCOPY to copy the contents of ORDFORM into the larger file: :RUN FCOPY.PUB.SYS >FROM=ORDFORM;TO=ORDFORM2 EOF FOUND IN FROMFILE AFTER RECORD 1015 <--- FCOPY response 1016 RECORDS PROCESSED *** 0 ERRORS Compiling the Forms File The forms defined through FORMSPEC are written to a forms file. The forms are initially stored as a "source" version. This source is modified if you change the forms file, but it must be compiled before it can be executed by an application, The compiled version, on the other hand, can be executed but not modified. The source version of the forms file is kept along with the compiled version for purposes of display and modification. Once modified, the source version must be recompiled before it can be executed. However, unless a global attribute of the forms file is modified, only those forms which were changed are actually recompiled. The global attributes include any save fields or the fields on the Globals Menu or the Terminal/Language Selection Menu. Note that the source version is the sequence of specification records entered on the menus. The compiled version is the sequence of forms displayed to the user. When your forms design is complete, you can compile the forms file to a "fast forms file". A fast forms file is similar to the forms file except that it is created with the smallest record size that can hold the largest form in the file. Also, it contains only the information that VPLUS/V needs at run-time, so it has fewer records. Because the record size and the number of records are minimal, such a forms file can improve performance at run-time. A fast forms file can only be executed; it cannot be modified. You may however always modify the source forms file and then recompile it to a fast forms file. The forms file can also be compiled using FORMSPEC in batch mode. (See Section 7 for more information.) Listing Forms Figure 3-13 illustrates the listing for a forms file. Note that the listing includes the current status of the forms file, including when it was last modified and compiled, and the number of two-byte words of stack space needed by VPLUS/V when accessing this forms file at execution time. Forms can also be printed using FORMSPEC in batch mode. (See "Using FORMSPEC in Batch Mode", Section 7 for more information.) Consult Appendix E, for information regarding the file equations which VPLUS/V uses when listing forms files.
[]
Figure 3-13. Forms File Listing
[]
Figure 3-13. Forms File Listing, continued


MPE/iX 5.0 Documentation