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

Files

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

One batch file containing collected data can be reformatted into one output file. This output file is then used as input to the application that processes the collected data. Data from more than one batch file can be written to one output file in sequence — that is, data from a batch file can be appended to data from another batch file in an existing output file with an MPE :FILE command equation. (See "Concatenating Batch Files", this chapter, for an example of this.) Without a file equation, data from each batch file overwrites data in an existing output file.

The reformatting specifications themselves are stored in a "reformat" file. The specifications in this file determine how the data in the batch file is to be stored in the output file.

One output file is generated for each reformat file. If you wish to separate the data into more than one output file, you must establish different reformat files, and run the reformatter program separately, to generate each output file. REFSPEC accepts either KSAM or standard MPE reformat files. The only forms files created by REFSPEC, however, are MPE files. In the MPE reformat files, the key and form records are interspersed throughout the file. MPE reformat files do not require extra data segments and are automatically recovered after a power failure or system crash. Refer to Appendix H for information on converting KSAM files to MPE files.

Reformat File

The reformat file consists of the following components:

Forms File Name

Identifies the forms file that contains the forms through which data in the batch file was entered.

Global Information

Specifications that apply to the entire output file, such as a string used for an end-of-record mark, or record length and whet her the record length is fixed or variable. Any or all global specifications can be omitted since defaults are provided.

Input Forms Sequence

Specify the form names on which data to be reformatted was entered. Only data from the forms in an input forms sequence is written to the output file. At least one input forms sequence must be included, and as many may be included as there are forms in the forms file.

Output Record Definition

Specify each field to be written to the output file, and define the beginning of each output record. Usually, one output record definition follows each input forms sequence.

Field Specifications

Special reformatting at the field level can be specified for each field listed in the preceding output record definition.

This information is entered on menus very much like those issued for FORMSPEC. Figure 5-2 “Prototype of REFORMAT File” illustrates a prototype REFORMAT file.

Figure 5-2 Prototype of REFORMAT File

Prototype of REFORMAT File
Feedback to webmaster