HPlogo HP Data Entry and Forms Management System (VPLUS) Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 1 VPLUS Overview

Product Overview

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

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.

Interface Design

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.

Transaction Processing

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.

Source Data Entry

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.

Features

The primary features of the VPLUS system are:

  • A forms design program (FORMSPEC) that allows quick and easy interactive forms design using menus.

  • Batch mode management of forms files, through FORMSPEC, that allows a forms file to be updated, compiled, and listed in a background job.

  • Advanced forms design, through FORMSPEC, that provides for editing, formatting, movement, and computation of data when the form is executed, using the user's native language for alphabetic information and the local customs for numeric and date information.

  • A set of intrinsics that manage the interface between:

    • an application

    • the terminal

    • the FORMSPEC definitions

    • the data displayed and entered on the terminal

    These intrinsics manage the interface from applications written in any of the supported programming languages.

  • A ready-to-run data entry program (ENTRY) that provides immediate use of forms for data entry and modification with no programming effort.

  • A flexible data reformatting design program (REFSPEC) that specifies reformatting of data collected in a batch file.

  • A batch program (REFORMAT) that reformats the collected data according to the REFSPEC formatting specifications and writes it to a file for use by an application.

  • Run-time data transformation capability (Application-Ready Buffer, or ARB) that allows data to be entered on the screen in an order and format the user understands, while the application receives the data converted and reordered to match the format of its storage record.

Figure 1-1 “Overview of VPLUS” shows an overview of the VPLUS system.

Figure 1-1 Overview of VPLUS

Overview of VPLUS

Designing Forms With FORMSPEC

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.

Levels of Forms Design

FORMSPEC has four complexity levels of forms design:

Simple Collection

You specify the form layout and FORMSPEC allows any character set codes that you enter. This level keeps the default field attributes and does not require any other FORMSPEC editing or formatting capabilities.

Simple Editing

You specify the form layout and specify edits for the field attributes, such as field type (optional, required, display only) or data type (character, numeric, or date). No processing specifications are required for the field attributes.

Full Field Editing

You specify field edits using processing specifications that apply to individual fields in a form. These include minimum length, range checks, pattern checks, etc. A subset of the available processing specifications are used for these edits.

Advanced Processing

You specify movement of data between fields and forms, arithmetic computation of data, formatting of data (JUSTIFY, FILL, STRIP), alteration of forms sequence, and conditional processing based on the result of processing specifications. This level implements the entire range of the processing specifications.

The following sections provide introductory information about each of these levels. Chapters 3 and 4 provide specific information on each level of forms design.

Simple Collection

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:

  • Adding a form or a save field

  • Selecting a terminal type or a native language

  • Going to the global characteristics or to a particular form or field

  • Listing a forms file or a form

  • Deleting a form

  • Copying a form

  • Compiling the forms file

  • Relating a child form to a parent form

  • Going to the Application-Ready Buffer (ARB)

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.

Figure 1-2 FORMSPEC Form Menu

FORMSPEC Form Menu

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.

Figure 1-3 FORMSPEC Screen Design

FORMSPEC Screen Design

Simple Editing

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.

Field Name

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.

Field Enhancement

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.)

Field Type

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).

Figure 1-4 Sample Field Menu

Sample Field Menu
Data Type

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.

Initial Value

You can use the Field Menu to specify a particular value to be displayed in that field when the form is first displayed at the terminal.

Full Field Editing

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:

Minimum Length

The value entered must be at least a specified number of characters long. For example, MINLEN 10 means at least ten characters must be entered in the field.

Equality

The value entered must be less than, less than or equal to, equal to, greater than or equal to, greater than, or not equal to a specified value. For example, GE FIELD2 means the value entered must be greater than or equal to the value entered in a different field, FIELD2.

Range Check

The value entered must be within (or not within) a range of values. For example, IN 10:20,F1:F4,100:300 means the value must be between 10 and 20, or between the values entered in fields F1 and F4, or between 100 and 300, inclusive.

Table Check

The value entered must be in (or not in) a table of values. For example, IN 5,10,15,F7+5 means the value must be 5, 10, 15, or the current value of field F7 plus 5.

Pattern Check

The value entered must match a particular pattern. For example, MATCH Aaa-ddd means the value must start with the letter "A" and be followed by two alphabetic letters, a hyphen, and three digits.

Check Digit

A check digit in the entered value is checked according to modulus 10 or 11. For example, CDIGIT 10 checks the value according to a modulus 10 check digit test.

Advanced Processing

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.

Figure 1-5 Advanced Processing Specifications

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.

Advanced Processing Statements

The advanced processing statements provide:

Data Movement

You can set any field to a particular value, or to a value moved from another field. Default formatting of the data is performed during movement according to the data type of the destination field.

For example, SET TO !JUNE 17,1999! moves the date constant (which must be delimited by exclamation points) to the current field. Another example, SET F1 TO F3, moves the value in the field F3 to the field F1.

Arithmetic Calculation

You can set any numeric field to a value calculated using standard arithmetic operators (+, -, *, /, %).

For example, SET TAX TO TOTAL*TAX_RATE multiplies the value in the field TOTAL by the value in the field TAX_RATE and moves the result to the field TAX. (All these fields must be numeric.)

Data Formatting

You can specify particular formatting of the entered data in addition to default formatting. Formatting includes: STRIP, JUSTIFY, FILL and UPSHIFT.

For example, JUSTIFY RIGHT; FILL LEADING "0" moves the data to the right of the field, and then fills any leading blanks with zeros.

Forms Sequencing

You can change the form sequence originally specified for the form on the Form Menu.

For example, CHANGE NFORM TO $HEAD changes the next form to the head form. The head form is the first form displayed. One form is designated as the head form in the global characteristics. Another example, CHANGE CFORM TO NO REPEAT, stops the current form from repeating.

Conditionals

You can execute a processing specification, or group of specifications, but only if a particular edit is true.

For example, IF F1 EQ 20 CHANGE NFORM TO CLEAR clears the current form and displays the next form when the value of field F1 equals 20.

Phases

You can execute processing statements in one of four phases: configuration (CONFIG), initialization (INIT), field editing (FIELD), and finish (FINISH).

Save Fields and Other Global Specifications

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.

Application-Ready Buffer

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:

  • Holds data as the application will use it, which may differ from how it appears on the screen.

  • Synchronizes with other application sources, such as the program code and databases.

  • Facilitates maintenance in that the user can rearrange fields on the screen without modifying the application program. Conversely, changes in the application program that affect the ARB do not necessarily require changes in the screen.

  • Supports an extended range of data types, including floating-point decimal and COBOL-packed and zoned decimal.

  • Simplifies coding, because the field-by-field transformation is specified in the forms file rather than by using a series of transformation intrinsics in the application program.

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.

Program Interface Intrinsics

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:

Terminal Interface

These intrinsics open and close a terminal file, load and unload forms (if the terminal has local forms storage), display a form and data to the terminal, and read data entered in fields of the displayed form.

Forms File Interface

These intrinsics open and close a forms file, get the next form in sequence from the forms file, and print the current form, with its contents, on the line printer.

Data Manipulation

These intrinsics initialize a form to its initial values, perform any user-defined edits, and perform any final form processing.

Access to Data

These intrinsics move data between the application program and VPLUS work areas. The data can be moved one field at a time or as a single buffer for the entire form. Data can be moved as character strings, or it can be transformed to and from internal representations most useful to the application program. The data transformations may be predefined for the entire buffer in the forms file using FORMSPEC (the ARB). If field-by-field movement is used, the transformation type is specified by the intrinsic name.

Data Transformation

These intrinsics gather data entered by the user at the screen and transform it into the format most useful to the application, or vice versa. Data passed to or from fields can be converted to or from a variety of data types.

Status/Error Control

These intrinsics set or capture error flags and display messages.

Batch Data Collection

These intrinsics open and close the batch file, write data to the batch file, or read data from the batch file.

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.

Figure 1-6 Transfers Controlled by VPLUS Intrinsics

Transfers Controlled by VPLUS Intrinsics

Entering Data with ENTRY

VPLUS features a standalone data entry program, called ENTRY. Forms and data specifications are created using FORMSPEC. This program does the following:

  • Displays forms at the terminal

  • Accepts and validates data entered on the forms

  • Writes the data to a batch file

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.

Data Collection

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:

  • Request the first (or head) form in execution sequence.

  • Terminate a repeating form and display the next different form.

  • Reset the current form to its initial values.

  • Print the current form with its initial values on the line printer.

  • Request browse/modify mode to view and/or change data already written to the batch file.

  • Terminate ENTRY.

Browse/Modify

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:

  • Display data from the first batch record on its form.

  • Display data from the previous batch record on its form.

  • Display data from the next batch record on its form.

  • Reset the current form to the values displayed before any current modifications were entered.

  • Delete the record currently displayed at the terminal.

  • Print the current record on the line printer.

  • Return to collection mode to enter new data.

  • Terminate ENTRY.

Reformatting Data

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:

  • Combine data entered on several forms into one output record.

  • Separate data entered on a single form into several output records.

  • Rearrange data within a record, inserting constants, and generating check digits before writing it to the output file.

  • Format data within fields by justifying, filling, stripping characters, or adjusting the sign of a numeric value.

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.

Feedback to webmaster