Printing files – HP NonStop G-Series User Manual

Page 98

Advertising
background image

Printing Files

The OSS print utilities include three utilities: lp, lpstat, and cancel. The lp utility sends the
print job requests to the Guardian spooler. The lpstat utility shows the status of the online printer
devices and the job requests. The cancel utility removes a print job from the spooler print queue
and stops it from being printed.

The lp utility is an interface layer between an OSS process and the Guardian spooler subsystem.
The print request passes through the lp utility and is redirected to the spooler. The spooler process
then copies the file data to the print queue until the specified printer device is available to print
the jobs. lpstat allows users to query the job status while the job is in the spooler, and the
cancel

utility allows users to remove print jobs from the print queues. For more information about

the lp, lpstat, and cancel utilities, see their reference pages either online or in the Open
System Services Shell and Utilities Reference Manual
.

When the job is sent to the spooler, it is assigned a job number in the range 1 through 4095. The
job number identifies each print job. In addition to the job number, jobs have other attributes, such
as batch number, priority, copies, report name, form name, state, and location. The Guardian
PERUSE command is used to display or alter these attributes. The lpstat utility shows some of
the print job attributes, but it cannot alter them. The cancel utility uses the job number returned
by the lpstat command to delete a job from the print queue.

All command requests to the spooler using the Guardian SPOOLCOM or PERUSE command are
validated for authorization. Any user can obtain the status of any job in the spoolers, but only the
job creator can change the status of his or her own jobs.

There are three levels at which an application program can spool a job to the spooler:

Level-1 spooling uses the system default values for the job attributes and uses low-level Guardian
WRITE, CONTROL, and SETMODE procedures.

Level-2 spooling is similar to Level-1 spooling, except that the default job attributes can be
specified with the use of the SPOOLSTART procedure.

Level-3 spooling uses spooler interface procedures to send data to the spooler. The data is
buffered so a more efficient data transfer is possible. The lp utility uses Level-3 spooling to
interface with the spooler system.

The lp utility supports multiple printing (up to a maximum of 32767 copies) of the input file. Each
copy is printed as an integral whole and not interleaved with portions of other files.

The lp utility supports the printing of all text files generated by Open System Services (simple ASCII
files). For system interoperability, the lp utility also supports the printing of Guardian files that are
EDIT files (type 101), compiler listings (type 129), and PostScript files (type 0) from the /G directory.
In general, the lp utility does not attempt to interpret or preprocess its input file data before sending
it to the spooler; therefore, the lp utility cannot guarantee the results of the printer outputs if the
input files to the lp utility are not one of the file types specified here (that is, if the files are other
structured or unstructured Guardian files or object files).

The lp utility prints to all printer devices supported in the Guardian environment. It also allows
users to specify and control the specified printing operation if these functions are supported by the
printer devices themselves: for example, double-sided printing. Since many of the common printer
attributes are incorporated in the spooler device location names (that is #land for landscape mode,
#book for book form, and #pscrpt for PostScript printer), users are responsible for knowing the
types of input files that they want to print and for selecting the correct types of printer devices or
correct device names for their input files.

The lp utility allows print jobs to be sent to any locally and remotely accessible Guardian online
printer destination. The lpstat utility has the capability of showing the status of all local and
remote printer devices. Likewise, the cancel utility allows print jobs to be canceled from local or
remote spoolers.

98

Managing Files

Advertising
This manual is related to the following products: