|
|
HP Data Entry and Forms Management System (VPLUS) Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 1 VPLUS Overview Product Overview |
|
VPLUS is a comprehensive software system that provides an interface between a terminal and any transaction processing program. The interface can support the formatting, editing, and validation of data as well as the display and collection of that data. VPLUS also includes a source data entry facility that provides a "front end" for batch transaction processing applications. The interface between the user at a terminal and the application program is implemented as a form. VPLUS enables you to easily design the layout of the form and the data to be displayed and entered on the form. A variety of processing for the data can be specified to occur before and after it is displayed and entered. VPLUS provides a set of intrinsics that enables you to control forms and data on a terminal from an application program. These intrinsics are available for programs written in any of the supported programming languages listed in appendix A. Additionally, some languages (also listed in appendix A) provide a special interface with terminals and forms, as described in their respective reference manuals. With these languages, you do not call VPLUS intrinsics directly. Instead, you specify the appropriate statements for the special interface. VPLUS provides a ready-to-use data entry program, called ENTRY, for collecting data without any programming effort. The data is collected in a file for later batch processing. Users can browse the entered data using ENTRY and modify the data while browsing it. If you need additional or different capabilities that ENTRY does not provide, you can write your own application that incorporates VPLUS intrinsics. Appendix A, "Sample Programs", includes sample source data entry programs. VPLUS also provides a batch reformatting capability. You can create specifications to control how collected data is to be reformatted, and then run a program to actually reformat the data. The collection and reformatting capability, either singly or combined, provide a method of adding interactive source data collection to existing batch applications. The primary features of the VPLUS system are:
Figure 1-1 “Overview of VPLUS” shows an overview of the VPLUS system. FORMSPEC enables you to design forms ranging from simple to complex. FORMSPEC keeps forms in a special file, called a forms file. A forms file can have one or many forms. There may be multiple forms files per application or multiple applications per forms file, depending on the complexity of the task to be performed. You must compile the forms file before using it in an application program. You can modify forms at any time, but you must recompile the forms file to use the modified forms in your program. You enter the form specifications on formatted screens, called menus, that FORMSPEC displays. The Main Menu and terminal function keys enable you to display all of the FORMSPEC menus. The various menus enable you to perform tasks, such as changing existing forms, adding new forms, and deleting forms or fields. FORMSPEC has four complexity levels of forms design:
The following sections provide introductory information about each of these levels. Chapters 3 and 4 provide specific information on each level of forms design. When you run FORMSPEC, the first menu to appear is the Forms File menu in which you specify the name of the forms file. After you specify the forms file, the Main menu appears, enabling you to select one of the following tasks:
For example, if you want to select the task of adding a form, FORMSPEC would respond by displaying the Form menu, shown in Figure 1-2 “FORMSPEC Form Menu” You would use this menu to enter the form name and indicate how you want the form to be sequenced. This menu offers several options, such as appending to the current form. Chapters 3 and 4 instruct you about specifying whether the current form is to be repeated, or repeated and appended to itself. After you make the desired selections, FORMSPEC provides you with a blank screen to design your form. You can use any of the terminal capabilities on this screen to insert or delete lines or characters, and to position the cursor. The special terminal capabilities that provide field enhancements, such as half bright, color, inverse video, or blinking are selected through FORMSPEC Field Menus, as described in chapters 3 and 4. You do not need to use complicated escape sequences to request enhancements to data fields. The position of a field is defined by field delimiters. You identify each field by typing its name within these delimiters. If the field is too short for a meaningful name, you can provide a longer name later, if desired. The position of the beginning and ending of the field automatically defines the maximum length of each field. Field delimiters can be either brackets ([ ]) or invisible control characters, as shown in Figure 1-3 “FORMSPEC Screen Design” If the delimiters are not visible, you can use a fill character to make the actual length of the field visible during design. You can edit each field of a form by using the Field Menus. Figure 1-4 “Sample Field Menu” is a typical Field Menu example, which shows the various field attributes in the highlighted fields. This menu displays the field name and length determined by the form design. The menu also displays the data type, field enhancements, and the field type, any of which you can change by typing a new value over the displayed value. You can also assign the field a new name by which it is subsequently referenced, and you can specify an initial value for the field. This parameter enables you to assign a field name longer than that assigned during form design. This is useful, because during form design, an identifier for each field typed within the field limits the field name to the length of the field. VPLUS displays each field in half bright, inverse video (code=HI) unless you change the value for the enhancement parameter on the Field Menu (or in the Globals Menu). Other enhancements, underline, blinking, color, and security can combine with or replace the default enhancements, or you can eliminate field enhancements altogether. (Only some terminals support color and security. Refer to "Supported Terminals Features" in appendix G for more information.) This attribute controls how data is entered in the field. For example, if a field must contain a value, simply change the field type from the default value O (optional) to R (required) as shown in Figure 1-4. If a user then does not enter data in the field, an error message appears. If you want to prevent a user from entering data in the field because you plan to use it only to display data, change the field type to D (display only). You can force a field to be processed even if it is blank by changing the field type to P (process). This attribute controls the type of data allowed in the field. Suppose you want to make sure that only digits are entered. Simply change the data type from the default type (CHAR for any character set code) to DIG. Or, if you want to allow entry of a signed number with two decimal positions and a decimal indicator, you can change the data type to NUM2 as shown in Figure 1-4 “Sample Field Menu” If the user enters a non-numeric value, an error message appears. To specify full-field edits, you enter simple language statements in the lower portion of the Field Menu, labeled Processing Specifications. These field processing specifications enable you to check a field value for:
Processing specification statements are similar to elements of a programming language in that the order of entry is significant. Figure 1-5 “Advanced Processing Specifications” shows a Field Menu that includes advanced processing specifications. In this example, the UPRICE field (already specified as required and numeric) is limited further. The minimum value that may be entered in this field is 1. A custom error message "MINIMUM ORDER IS $1.00" appears if the user enters any value less than 1. Also, if the user enters a value greater than 10,000, a special next form, FORM2, appears when the user presses Enter. The advanced processing statements provide:
You can use the Save Field Menu to define special fields, called save fields, for the entire forms file. These fields are global to the forms file, and can be referenced in the processing specifications of any field in any form. Save fields are primarily useful for passing values between forms. FORMSPEC supplies certain global characteristics of a form as defaults, such as field or error enhancements and the placement of the error/status line on the form. You can change these default characteristics using the Globals Menu. An application-ready buffer (ARB) is a buffer passed between the application and the run-time intrinsics for data collection and display. It performs the following functions:
The ARB presents data as the application expects to use it, such as to update a database, whereas the screen receives and displays data in the format that the user understands. This distinction between screen data and application-ready data facilitates maintenance. Refer to Chapter 3 for information about creating an ARB. All terminal-oriented applications can use a library of high-level intrinsics. Any of the supported programming languages listed in appendix A can call these intrinsics. Appendix A also contains listings of sample applications that use the intrinsics. The program interface provides intrinsics for the following:
Figure 1-6 “Transfers Controlled by VPLUS Intrinsics” shows an overview of the various transfers between elements controlled by the VPLUS intrinsics. Note that many applications use their own files or data bases rather than the VPLUS batch file for the collected data. VPLUS features a standalone data entry program, called ENTRY. Forms and data specifications are created using FORMSPEC. This program does the following:
ENTRY operates in two modes: data collection and browse/modify. Data collection mode collects data from the terminal, and browse/modify enables you to look at the collected data and modify it if necessary. When the user first runs ENTRY, the initial mode is always data collection. The user must request browse/modify by pressing a terminal function key. Chapter 2 provides complete information about using ENTRY. The following sections discuss principles of data collection and browse/modify. ENTRY displays forms on the terminal screen in the order that FORMSPEC determines. Each form is displayed with any initial values specified for the form. As each form is displayed, the user types data into the "unprotected" fields on the form. (These are the fields that permit data entry; they include all fields defined on a form except "display only" fields.) After typing in the data, the user presses Enter. ENTRY then tests the entered data for errors and, if errors are found, it enhances each field in error. The particular enhancement is determined by the forms designer. The default error enhancement is inverse video underline. ENTRY also displays a message associated with the first field with an error. The user can then correct the error (or errors) and press Enter again. ENTRY continues to check the entered data until no errors are detected. It then writes the data entered on the form as a single record to the batch file, and displays the next form in form sequence. Note that the forms designer determines the form sequence. However, the terminal function keys provide the user some control over this sequence. These keys enable the user to:
The user can view the data already written to the batch file by requesting browse/modify mode. The user requests this mode by pressing a terminal function key. The same key returns the user to data collection mode at the point of interruption. When browse/modify is requested, the previous data record written to the batch file is displayed on the form through which it was entered. The user can examine the data, change it if desired, and then press Enter. Any new data is written to the same batch record, overwriting data previously entered in the same form. If the user wants to examine the entire file, he or she simply presses a function key to request the first batch record. The data in this record is displayed on the form through which it was entered. When NEXT is pressed, the data in the next batch record is displayed. The user can progress through all the records in the batch file by making changes as required and pressing Enter, or by leaving the data unaltered and pressing NEXT. As with data collection, terminal function keys enable the user to have further control over the sequence of browsed data. The keys for browse/modify allow the user to:
ENTRY writes entered data to a batch file. This file can then be used as input to an application. Sometimes it is necessary to reformat the data in the batch file so that it meets the input requirements of the application. VPLUS provides a reformatting capability that enables you to:
The REFSPEC program enables you to specify how you want to reformat the batch file. This program operates very much like FORMSPEC in that it displays menus, allows you to "draw" a pattern of the output record, and allows you to accept default field formatting or specify your particular formatting. When you have created all of the reformat specifications, you compile the reformat file. The REFORMAT program reads data from the batch file, reformats it according to the REFORMAT file specification, and writes it to an output file. REFORMAT can be run any time after a data entry batch file has been written. It can be run from a terminal or as a batch job, requiring only the names of the batch file, the reformat file, and the output file. The application can then use the output file it creates. Refer to Figure 1-1 “Overview of VPLUS”, "Overview of VPLUS," for the flow of data between the batch file, through the reformatting specifications entered with REFSPEC, to the output file. |
|