HP 3000 Manuals

HPDPRINTFORM [ High-Level Screen Management Intrinsic Library (Hi-Li) Reference Manual ] MPE/iX 5.0 Documentation


High-Level Screen Management Intrinsic Library (Hi-Li) Reference Manual

HPDPRINTFORM 

Integrates text with a form and prints the result.

Syntax 

HPDPRINTFORM globalpak, returnpak, formcntrl, fillcntrl, devicenum, 
datadescrpt, databuf 

Parameter Descriptions 

globalpak                 A compound parameter that passes information
                          between intrinsics.  For a complete description
                          of this parameter, see "Global Parameters" in
                          Chapter 3.

returnpak                 A compound parameter that passes information
                          back from the intrinsic to the application.
                          For a complete description of this parameter,
                          see "Global Parameters" in Chapter 3.

formcntrl                 A compound parameter that provides printing
                          information to the intrinsic.  It is made up of
                          the following subparameters:

                          formname                  A 32-byte character
                                                    array that supplies
                                                    the USASCII character
                                                    name of a form.  This
                                                    name represents the
                                                    scheme used to
                                                    arrange data that is
                                                    sent to the printer.

                          undrlncntrl               A four-byte integer
                                                    to specify whether or
                                                    not to underline
                                                    fields.  The values
                                                    you can use are:

                                                    0 = do not underline
                                                    fields
                                                    1 = underline all
                                                    fields

                          pagecntrl                 A four-byte integer
                                                    that specifies page
                                                    control.  The values
                                                    you can use are:

                                                    0 = page eject
                                                    1 = carriage
                                                    return/line feed

                                                    Note:  Page control
                                                    works before a form
                                                    is printed; that is,
                                                    "advance before
                                                    writing".\

                          enablereformat            A four-byte integer
                                                    used by the
                                                    application to
                                                    indicate that the
                                                    data is to be
                                                    reformatted after it
                                                    is merged with the
                                                    form.  It is
                                                    reformatted before
                                                    the form and data are
                                                    printed according to
                                                    the specifications
                                                    embedded in the form.
                                                    You can use the
                                                    following values:
                                                    0 = ignore
                                                    reformatting
                                                    specifications
                                                    1 = reformat data

fillcntrl                 A compound parameter that tells HPDPRINTFORM to
                          replace, or fill, blanks within fields when
                          printing the form.  The subparameters and the
                          functions they represent are:

                          filldesc                  A four-byte integer
                                                    that specifies the
                                                    degree of
                                                    functionality.  The
                                                    values you can
                                                    specify are:
                                                    0 = no fill
                                                    1 = fill trailing
                                                    blanks
                                                    2 = fill leading
                                                    blanks
                                                    3 = fill trailing
                                                    and leading
                                                    blanks,newline>

                          entrycnt                  A four-byte integer
                                                    that specifies the
                                                    number of fields to
                                                    be filled.

                          fldidtype                 A four-byte integer
                                                    that specifies the
                                                    format of field
                                                    identifiers, numbers
                                                    or names.  The values
                                                    you can specify are:

                                                    0 = number format
                                                    1 = name format

entrydesc                 Identifies a table defined in your application.

fldid                     If you have given fldidtype the value 0, this
                          is a four-byte integer that identifies by field
                          number or field order the field to be filled.
                          The values you can specify are:
                          > 0 = field number
                          < 0 = field order

                          If you have given fldidtype the value 1, this
                          is a 32-byte character array that contains the
                          USASCII name of the field to be filled.

fillchar                  A four-byte character array that identifies the
                          fill character.  Blanks may be used as a fill
                          character.  The array is set up as follows:

                          The first byte contains the fill character.

                          Bytes two through four are reserved for system
                          use.

                          Note:  You cannot fill a field larger than 2000
                          bytes.  If you attempt to fill a field that
                          contains more than 2000 bytes, a warning is
                          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 printed
to accompany the receipt.



MPE/iX 5.0 Documentation