Technical data

Managing Peripheral Devices
8.8 Managing Printers
8.8.1 Setting Printer Characteristics
Printer characteristics must be set prior to starting queues for the printers. The
DCL command SET PRINTER establishes characteristics for a line printer. The
DCL command SET TERMINAL sets characteristics for a printer connected to a
terminal or LAT port.
In addition, if you want to spool your printers, you must do so before starting
the queues to be associated with those printers. For information about spooled
printers, see Section 8.8.2.
To execute these commands each time your system boots, add these commands
to your site-specific startup command procedure. If your configuration is simple,
you can add the commands to SYSTARTUP_VMS.COM. If your configuration
requires a large number of commands, create a separate command procedure (for
example, PRINTER_SETUP.COM) and execute it from SYSTARTUP_VMS.COM.
When the device setup command procedure finishes executing, control returns to
SYSTARTUP_VMS.COM.
Example
The following example provides sample commands you could include in your
startup procedure to set device characteristics for printers. This example
also includes the commands used to spool printers. You generally include
the commands to spool printers along with the commands to set device
characteristics.
$! Set up line printer devices
$!
$ SET PRINTER/PAGE=60/LOWERCASE/TRUNCATE LPA0:
$ SET PRINTER/LA11/UPPERCASE/WRAP LPB0:
$ SET DEVICE/SPOOLED=(LINE_PRINT,SYS$SYSDEVICE) LPA0:
$ SET DEVICE/SPOOLED=(SYS$PRINT,SYS$SYSDEVICE) LPB0:
$!
$! Set up LAT printers
$!
$ SET TERMINAL LTA331:/SPEED=9600/DEVICE=LN03 -
/NOBROADCAST/NOECHO/HARDCOPY/NOTYPE_AHEAD/PERMANENT
$ SET DEVICE LTA331:/SPOOLED=(MKTG$LN03_1,SYS$SYSDEVICE)
$!
$ SET TERMINAL LTA332:/DEVICE=LA210/PAGE=66 -
/NOBROADCAST/PERMANENT
$ SET DEVICE LTA332:/SPOOLED=(LA210$PRINT,SYS$SYSDEVICE)
8.8.2 Using Spooled Printers
Certain application programs print output by writing or copying data directly to
a printer rather than submitting it to a queue. A spooled printer causes such
an application program to write output to an intermediate storage device (such as
a disk) so that the printer targeted to print the output remains available to other
system users while the program is running.
When you spool a printer, you specify a storage device and an output queue to
be associated with that printer. When a process running an application directs
its output to the spooled printer, the output is instead placed in a temporary file
on the storage device. When the file is closed, the system submits the file for
printing on the associated output queue. Both the spooling of the output file to
an intermediate storage device and the subsequent queuing of a job consisting of
this file occur without the direct intervention of the user.
Managing Peripheral Devices 835