This section contains information about:
Print APIs can obtain information about or perform
printing activities on the AS/400 system.
Print APIs can:
- Retrieve
output queue information such as status and number of entries
on the queue.
- Retrieve information about specific printer writers.
- Transform data streams from one type to another.
The print APIs include the
following:
- Build Open Time Commands (QSPBOPNC)
uses the attributes of the spooled file to
build commands that must be sent ahead of the data to prepare
the printer to print the spooled file.
These commands are referred to as open time
commands.
The open time commands contain most of the file level commands needed
to format the printed output.
- Build Separator Pages (QSPBSEPP)
builds the system separator page to be printed
for the spooled file. A user exit program is called to build
the separator page or the system default is used. The separator
page is returned in the receiver variable parameter. This data
can then be sent to the printer.
- Change Output Queue (QSPCHGOQ)
changes the attributes of the output queue specified.
For example:
- User-defined options
- Qualified user-defined object name and type
- Qualified user driver program name
- Qualified user data transform program name
- User-defined data
- Convert Image (QIMGCVTI, QimgCvtImg)
converts an image or print data stream from
one format to another, and optionally prints the result.
- Extract Writer Status (QSPEXTWI)
is used by a driver program to access
information about the writer, the spooled file the writer is processing,
and to determine if
the information for the spooled
file has been changed. A call to this API
should be made by a driver program after each buffer is sent to the
printer.
- Host Print Transform (QWPZHPTR, QwpzHostPrintTransform)
provides an interface to the Host Print Transform function.
The Host Print Transform function transforms SCS or AFP data to
ASCII data.
- Open List of Printers (QGYRPRTL) generates a list of printers on the
system. Information about each printer is included with the list.
- Retrieve Output Queue Information (QSPROUTQ)
retrieves information associated with the specified output queue.
Information returned includes the parameters used to create the queue,
the current status of the queue, and the number of entries on the queue.
- Retrieve Printer Attributes (QGYRPRTA) retrieves attributes about a specific printer device.
- Retrieve Writer Information (QSPRWTRI)
retrieves printer writer information associated with the
specified printer only when a printer writer is started to the printer.
The information retrieved is similar
to what can be seen when running the Work with Writer
(WRKWTR) command for a particular printer writer.
- Send Writer Message (QSPSNDWM)
is used by a driver exit program to send either an
informational or inquiry message to the writer's message queue.
- Set Writer Status (QSPSETWI)
is used by a driver exit program to update information
about a spooled file that a writer is processing. This information
is used on certain spooled file displays.
- Transform AFP to ASCII (QWPZTAFP)
transforms an Advanced Function Printing data stream (AFPDS) into an
ASCII data stream.
This ASCII data stream can be formatted for
IBM, Hewlett-Packard, or
PostScript-capable printers.