Guardian Programmer's Guide

Table Of Contents
Communicating With Printers
Guardian Programmer’s Guide 421922-014
11 - 2
Accessing a Printer
Accessing a Printer
This subsection introduces the system procedures that relate to printer control and
provides a skeleton program for printer access.
Procedures for Working With Printers
You access a printer the same way as you would any other file, by using file-system
procedure calls. You use the following procedures to perform the indicated tasks with
printers:
AWAITIO[X] Checks for completion of a pending I/O operation.
AWAITIO checks for completion of a READ,
WRITE, or WRITEREAD operation. AWAITIOX
checks for the completion of a READ, WRITE,
WRITEREAD, READX, WRITEX, or
WRITEREADX operation.
CANCEL Cancels the oldest outstanding operation on an
open printer.
CANCELREQ Cancels a specified operation on an open printer.
CONTROL Performs vertical forms-control functions.
DEVICE_GETINFOBYLDEV_ Provides the device type and configured record
length of the device specified by logical device
number as well as the CPU numbers where the
primary and backup I/O processes run.
DEVICE_GETINFOBYNAME_ Provides the device type and configured record
length of the device specified by name as well as
the CPU numbers where the primary and backup
I/O processes run.
FILE_CLOSE_ Stops access to an open printer.
FILE_GETINFO_ Provides error information and characteristics
about an open printer.
FILE_OPEN_ Establishes communication with a printer.
SETMODE Controls various printer functions.
SETMODENOWAIT Does the same as SETMODE, except that printer
functions are applied in a nowait manner.
WRITE[X] Prints a line on the printer.