High-Level Screen Management Intrinsic Library Reference Manual (32424-90002)

3- 20
generated telling you that only the first 2000
bytes of the field were filled.
devicenum
A four-byte integer providing input to and
output from HPDPRINTFORM, that specifies the
file number of the list file to which the form
will be written. If you specify a zero,
HPDPRINTFORM opens a list file named FORMLIST
with a device class of LP. This is equivalent
to the file equation
FILE FORMLIST; DEV=LP; REC=-80
Because this parameter is used for both input
and output from the parameter, your application
can interleave calls to this intrinsic with its
own writes to the list file. The Discussion
for this intrinsic provides an example.
datadescrpt
A compound parameter that tells the intrinsic
how data is to be mapped when moving it between
the application and the data fields on a form.
There are six data mapping methods. The first
and simplest uses the following values:
-1 = do not transfer data
0 = move all data.
Data is moved as a concatenated string of data
from the
databuf
parameter as type CHAR. The
number of bytes moved is equal to the sum of
the lengths of all the fields on the form.
See Chapter 4 for information about the other
five data mapping methods you can specify.
databuf
A record that defines for HPDPRINTFORM the
application area from where data is copied to
the fields on a form.
Discussion
HPDPRINTFORM gets and initializes a form, merges data supplied by the
application with the initialized form, finishes the form, and sends the
form and data to a spooled printer as output. The forms file must be
open before you call this intrinsic. You do not need a terminal to use
this intrinsic. An example of how you might use this intrinsic is to
print tickets.
As mentioned under the
devicenum
parameter, your application can mix
application writes with form prints, allowing your application to
interleave data from a form with other information. An example of this
is printing shipping receipts. Using the HPDPRINTFORM intrinsic, the
application prints a receipt using a predefined form. Then, depending
on
the material being received, special handling instructions can be print-
ed
to accompany the receipt.