HP Data Entry and Forms Management System (VPLUS) Reference Manual (32209-90024)
Chapter 5 223
Reformatting Specifications
Running REFORMAT
Running REFORMAT
Once the reformat specifications have been defined and are stored in a compiled reformat
file, you can run REFORMAT to actually reformat the data in the batch file and write it to
the output file.
REFORMAT is not an interactive program. That is, it does not prompt for any information.
It is usually run as a batch job, though it can be run from a terminal directly or as a
"streamed" job.
REFORMAT needs the names of three files: the "reformat" file containing the reformat
specifications, the "batch" file containing the data to be reformatted, and the "output" file
to which the reformatted data is written. To specify these files, use MPE :FILE commands
before running REFORMAT, as follows:
:FILE REFENTITY =
reformatfile
:FILE BATCH=
batchfile
:FILE OUTENTITY =
outputfile
For example, assuming a reformat file named REF1, a batch file named BAT1, and an
output file named OUT1, the following commands are needed to run REFORMAT:
:FILE REFENTITY =REF1
:FILE BATCH=BAT1
:FILE OUTENTITY =OUT1
:RUN REFORMAT.PUB.SYS
These file equations show the required files for running REFORMAT. You will also
probably want to list the reformatted data and, if you are running REFORMAT from a
terminal, you will want error messages listed on the line printer rather than on the
terminal screen.
A list of the reformatted data is very important when you run REFORMAT the first time,
so you can see whether your reformat specifications are doing what you expect. To list
reformatted data, include the file TESTLIST in the file equation that sends the listing to the
line printer:
FILE TESTLIST;DEV=LP
Another important file, particularly when you are running a session, is the error message
file. This file REFLIST normally is written to $STDLIST. Since $STDLIST in a session is the
terminal, you may want to equate this file to the line printer with the command:
:FILE REFLIST;DEV=LP
Concatenating Batch Files
Data from a batch file can be appended to data from another batch file in an existing
output file by issuing the following commands:
:FILE REFENTITY =
reformatfilename
:FILE OUTENTITY =
outputfilename
:FILE BATCH=
firstbatchfilename
:RUN REFORMAT.PUB.SYS