Technical data

Managing Peripheral Devices
8.8 Managing Printers
$! Set up and spool line printer devices
$!
$ SET PRINTER/PAGE=60/LOWERCASE/TRUNCATE LPA0:
$ SET PRINTER/LA11/UPPERCASE/WRAP LPB0:
$ SET DEVICE/SPOOLED=(SYS$PRINT,SYS$SYSDEVICE) LPA0:
!
$ SET DEVICE/SPOOLED=(SYS$PRINT,SYS$SYSDEVICE) LPB0:
$!
$! Set up and spool 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)
#
!
Spools the output device LPA0: by associating it with the storage device
SYS$SYSDEVICE and the queue SYS$PRINT. When output from an
application is directed to LPA0:, the data is temporarily stored on
SYS$SYSDEVICE until the application completes. This keeps the output
device LPA0: available for other jobs until the application’s output is ready
for printing. When the application completes, its output is submitted to the
queue SYS$PRINT.
" Spools the LN03 device on LAT port LTA331: by associating it with the
storage device SYS$SYSDEVICE and the queue MKTG$LN03_1.
# Spools the LA210 device on LAT port LTA332: by associating it with the
storage device SYS$SYSDEVICE and the queue LA210$PRINT.
8.8.2.2 Despooling a Spooled Printer
Occasionally, you might need to disable spooling on a device. For example, the
SET TERMINAL command can be executed only on a despooled output device. If
you need to disable spooling to an output device, use the SET DEVICE command
with the /NOSPOOLED qualifier.
You must stop the corresponding queues before you can change the spooling
status.
For more information about the SET DEVICE/NOSPOOLED command, refer to
the OpenVMS DCL Dictionary.
8.8.2.3 Testing a Spooled Printer
After establishing an output device as spooled, you should test the device, because
errors in disk or queue names are not detected until spooling is attempted. To
test a spooled device, use a command procedure similar to the following one:
$! *****TESTING SPOOLED DEVICE***
$!
$! set the device spooled
$ SET DEVICE/SPOOLED=(SYS$PRINT,SYS$SYSDEVICE:) LPA0:
$!
$! create a test file
$ CREATE TEST.LIS
!Add the first test record here.
!Ctrl/Z to exit the file
$!
$! write the file to the output device
$ COPY TEST.LIS LPA0:
$ EXIT
Managing Peripheral Devices 837