HP-UX SNAplus2 RJE User's Guide
SNAplus2 RJE Components and Operation
Processing Output Data
Chapter 354
In order for the rjeusrpad program to work correctly, you must
configure NL (new-line character) insertion for the device. The
rjeusrpad program uses the new-line characters to determine where
padding is necessary. It pads records to the maximum record length
configured for the device on the host. New-line characters are stripped
from the record after the padding is done. If rjeusrpad is not able to
successfully pad the output file, the file is deleted.
Using Output Programs
You can use program output to process data received from the host
without PDIRs or with PDIRs. Each method is described in the following
sections.
Program Output Without PDIRs
Once the output from the host has been received successfully, the output
program is invoked with the path name of the temporary output file as a
parameter. The data from the host is piped as standard input to the
program. For example, the data could then be piped to the HP-UX print
spooler lp, or to a shell script that calls lp with suitable parameters.
Program Output With PDIRs
Once the output from the host has been received successfully, the output
program starts. The parameters from the first PDIR received with the
data pass as parameters to the output program along with the pathname
of the tempor ary output file. The data from the host is piped as standard
input to the program. In other words, the host data is piped to the
following PDIR parameters:
program_name, date, time, forms, FCBname, train, copies,
volIO,
jobname, stepname, procstep, ddname, spinno, reqid
The program can then use the PDIR parameters to determine how to
process the data. Additionally, the temporary PDIR file for the output
can be accessed by adding the .i extension to the parameter specifying
the tempo rary output file name.
For example, the following shell script calls the print spooler lp with
different options according to the form name and number of copies
specified by the
forms
and
copies
parameters. (Note that
copies
is the
number of additional copies, not the total. copies=0 represents 1 copy.)