The Caché MultiValue Spooler
Setting Up a Windows Shared Printer
This section contains some hints for avoiding common pitfalls associated with setting up shared network printers on Windows for use by MultiValue applications. The suggestions here are not foolproof. Often getting a shared printer set up is an interactive process of repeated trials and tests.
Caché needs to have access to the network resource for jobs other than Terminal (|TRM| device) processes to be able to access the resource.
Use The Full Network Name
For example, to create a form queue called MYFQ which is associated with a Windows shared printer named HP7210 on a remote system whose network name is DELLHOME, and then print to it, issue the following:
USER:SP-CREATE MYFQ CACHE "|PRN|\\DELLHOME\HP7210"
USER:LIST VOC BASICLPTR
Use NET Commands
The following makes LPT1 the default windows printer. This can then be referenced by the Caché device name, "|PRN|"
. The net command is run from a windows shell, and then the SP-CREATE
from a MultiValue shell.
From a DOS command shell:
NET USE LPT1: \\DELLHOME\HP7210
and from the MultiValue shell:
SP-CREATE MYFQ STANDARD CACHE "|PRN|"
There are two mechanisms to help establish a good printer on the MultiValue spooler.
The command SP-TESTPAGE
outputs a test page to a Cache device. You can specify either the Cache device name, or the form queue name (and we extract the device name). For example:
Opening device name \\DELLHOME\HP7210, open mode rw, timeout 0
Device \\DELLHOME\HP7210 opened successfully!
Test writing to device \\DELLHOME\HP7210 reported no error.
One can use alternate names to SP-TESTPAGE
varying the form-queue name and target device. For example, using SP-TESTPAGE 0
selects Cache device 0, the current terminal, so the output is written to the terminal. The command SP-TESTPAGE "|PRN|"
directs output to the Caché default printer.
Run the DESPOOL process manually
Normally, an administrator will start a despool process in the background using the SP-START
command. However, for debugging purposes, a developer can start it from the COS command shell and watch for errors to the screen. For example,
MultiValue Despool opening device '\\DELLHOME\HP7210' , mode 'rw' , timeout ''