This chapter contains instructions on the general use of
LANprint print queues.
6.1 Printing on a LANprint Print Queue
Files can be printed on the queue using the DCL PRINT/QUEUE=queue_name command. For each print job, the Print Symbiont will establish a connection to the remote print server and will transfer the print file(s), formatted according to the queue and form settings. When the entire job has been transferred into the remote print queue, the network connection will be broken, and the completion of the job reported to the user.
The remote printer will not start printing a file until the Symbiont has transferred all of the data in that file. |
If the remote server is not available, perhaps because it has been
powered off, then the queue will appear to be printing but stalled.
This situation can be recovered by starting the server. The Print
Symbiont will try to connect to the server after a short delay, and
printing can commence. Messages can be output to the system operator to
inform him or her that the print job is being delayed.
6.2 Stopping a Print Job
An active print job can be aborted using the DCL STOP/QUEUE/ABORT or STOP/QUEUE/ENTRY commands. There is no way of telling the remote server not to print the data that has already been transferred, so the truncated file will be printed, with an error message at the end.
You will have to be quick if the remote server is available, because the Symbiont transfers the print file to the server at speed, and once the transfer has completed, that print job will no longer be 'active' in the VMS print queue. Aborting a print job that is in the remote server's queue, or that is actually printing on the server, requires actions at the server itself. Please refer to the server documentation for further instructions.
When the print job has been aborted, the Print Symbiont will continue
processing any further jobs that may be in the print queue.
6.3 Error Handling
The LANprint Symbiont is able to recover from some error situations. These include:-
These errors are recovered (if possible) by delaying for a period and repeating the operation. If the operator message facility has been enabled (see Chapter 4), status messages will be output to the operator log file and to any suitably configured terminals.
Unrecoverable errors which occur during the printing of a file will
result in the print job being abandoned and a %PSM-E-WRITERR error will
be returned to VMS.
6.4 Troubleshooting - Form Definitions & Truncated Output
The VIALPPSTARTUP.COM file is responsible for initialising the
LANprint queues and since it does not have any explicit printer
form associated with it it inherits the system-defined
DEFAULT form definition. This is normally fine but if that
form is defined with the /TRUNCATE attribute then lines of print output
are liable to be truncated when they exceed the width that is defined
for that form (via the /WIDTH setting). This may be precisely what you
want as it is generally appropriate for traditional line printer
devices, but it is commonly not appropriate for PostScript printers,
for instance, which will often use long lines to handle graphic images.
It is also often better to allow the remote print server to handle
overlength lines.
If you find that some print jobs start to print but are rejected by the
printer part way through then you should examine the DEFAULT form
definition and either change it, or stop and reinitialise the
LANprint queue(s) with a new form definition. The following
command displays the current definition of the DEFAULT form:-
This form definition is generally appropriate for PostScript printers.
Note that it does not have either /TRUNCATE or /WRAP settings.
If it did have either /TRUNCATE or /WRAP then these could be removed
with the following command:-
$ show queue/form/full default
Form name Number Description
--------- ------ -----------
DEFAULT 0 System-defined default
/LENGTH=66 /MARGIN=(BOTTOM=6) /STOCK=DEFAULT /WIDTH=132
$ define/form default 0 /notruncate/nowrap
This will affect all VMS print queues that are using this form definition. |
If you do not wish to affect all print queues in this way then you can use the following command to create a new form:-
$ define/form lanprint 500 /notruncate/nowrap/width=132 |
And you can edit the INITIALIZE/QUEUE commands in VIALPPSTARTUP.COM to include the "FORM=LANPRINT" setting in the /DEFAULT qualifier so that the queue is started automatically with this setting, as shown in this example:-
$ INITIALIZE/QUEUE/START/PROCESSOR=LPPSYMBIONT - /DEFAULT=(FORM=LANPRINT,NOBURST,NOFEED,NOFLAG) /ON='DEVQUE0' 'DEVQUE0' |
An alternative to establishing an appropriate form for the queue is to submit individual print jobs with a /FORM=formname qualifier to allow the behaviour to vary on a job-by-job basis.
LANprint/PC is an MS-DOS program which provides a print gateway between the NetBIOS/LAN Manager environment used by the LANprint Print Symbiont, and foreign environments such as Novell NetWare. As well as providing a gateway to networks that are not based upon the NetBIOS and LAN Manager protocols, it can be used to connect to another LAN Manager network that is running on different network hardware, such as Token Ring. LANprint/PC is a foreground program, so it requires a dedicated PC, unless it is run under Microsoft Windows (see Section 3.6.3 for details). It can co-exist with background programs such as the TSRs used in the LANbridge, LANutil, LANview, and LANlink packages. LANprint/PC is described further in Section 1.1.3.
LANprint/PC acts as a print server, offering print resources to clients on the NetBIOS network. The correlation between named resources and local devices is defined by command line arguments when LANprint/PC is started. While it can cope with printers that are directly connected to LPT1, LPT2, and LPT3, (so long as the paper doesn't run out), this is not recommended. The local print devices should be redirected to remote print server(s). This redirection should be performed before LANprint/PC is started. It relies on transparent redirection for its normal operations.
LANprint/PC can provide simultaneous access to its print resources for a number of clients, subject to the restriction that each resource can only have one active user at any time, i.e. each resource can only support one writer at a time. Provided that this condition is satisfied, there can be many more clients than actual resources.
Clients connect to LANprint/PC by means of the LAN Manager
(SMB) Protocol. LANprint/PC supports the "PC NETWORK PROGRAM
1.0" dialect of the SMB protocol.
7.1 Resource Requirements
The LANprint/PC program requires a minimum of 64 KBytes of memory to run. This is in addition to the resource requirements of any NetBIOS or bridge software.
LANprint/PC can be configured to control the number of print resources that can be shared, as well as the amount of memory and NetBIOS resources that are used.
For a typical configuration, with three print resources, and default values for the number of sessions and buffer sizes, the memory requirement is 70 KBytes.
Host packages such as the LANprint Symbiont will normally
establish a session with LANprint/PC for the duration of a
print job only. When the print job has been transferred, the session is
closed down, and LANprint/PC is available for other callers.
It should be noted that PC clients will often have a session open to
LANprint/PC without actually printing anything. The
configuration chosen should allow for the maximum number of sessions
that will be needed.
7.2 Gateway Gonfiguration
Normal access to the remote print server is provided by the standard networking package (e.g. Novell NetWare). This package should be started up and any relevant printer redirection (capture) operations performed before LANprint/PC is started. If the PC is also acting as a NetBIOS bridge, the bridge program should be started and configured before LANprint/PC is started up.
If several NetBIOS programs have been loaded, LANprint/PC can use any one of them to offer its services.
The particular NetBIOS is selected by 'Adapter Number'. The first NetBIOS is loaded as Adapter 0, and later ones as Adapter 1, 2, and so on.
The Novell NetWare NetBIOS emulator loads as Adapters 0 AND 1, so the next NetBIOS is Adapter 2. The default adapter number for LANprint/PC is 0. LANprint/PC can only use one NetBIOS adapter at a time. |
LANprint/PC can be run from a DOS batch file or by typing 'LANPRINT' at a DOS prompt. If no further command line parameters or options are entered, LANprint/PC will display its usage message and will then exit.
When the command line is scanned, most items will be converted from lower case to UPPER CASE (capital letters). It is not important whether items are entered in lower or upper case.
For example:-
C:\>lanprint
LANprint for PATHWORKS - Version 1.1 - 10-Sep-1993.
Copyright (c) 1993 BTVC & Vector Networks Limited. All Rights Reserved.
LANprint/PC Print Gateway Program LANPRINT.
Usage: LANPRINT [-option] <LPTx[=name]>[ -p:<password>] -option -option )
Options: -A:Adapter_num Default : 0
-B:Buffer_Size Default : 4136
-D Debugging On Default : Off.
* -F Form Feed Between Files Default : No.
-N:Network_Name Default : LANPRINT
-P:Password Default : None
-R Add Redirector Name Default : No.
-S:Maximum_Sessions Default : 4.
-T:NetBIOS_Timeout Default : 30 seconds.
-U Add Unique Name(s) Default : No = Add Group Name(s).
-V Verbose Mode On Default : Off.
* -W:Write_size Default : 0 = Write All Data.
* If the -f or -w switches are entered before the first shared resource name,
the value applies to all resources. If entered after a resource, the value
overrides the default setting for the preceding resource only.
C:\>
|
Apart from the name(s) of the shared resource(s), all command line parameters and options are optional.
Each shared resource should be in the form LPTx where x is 1, 2, or 3. This provides the name of the printer output device. It is possible to provide each of these resources with an alias name. This is done by following the LPTx with an '=' and the alias name. There must not be any spaces or tabs on either side of the equals sign. If no alias name is provided, the actual name of the device is shared instead.
For example:-
C:\>lanprint lpt1 lpt2=laser -p:secret lpt3=draft -a:2 -v |
In this example, two of the devices are given aliases to make them easier to remember.
Note that LASER also has a password.
The "-A" option specifies that NetBIOS Adapter Number 2 is to be used.
Some command options are positional. Others apply regardless of where they appear in the command line. The -p:password option is an example of the former type, and the "-A" and "-V" options are examples of the latter type.
When a client wants to print a file on the LASER printer, it
has to connect to path \\LANPRINT\LASER before it can send any print
data. In this case, LANprint/PC will also check the password
supplied. LANprint/PC will catch the data, and forward it to
the remote print server via device LPT2.
7.4 Stopping LANprint/PC
LANprint/PC will exit if it encounters a fatal error during its startup initialisation. Once it is running, it is necessary to type <Control-C> on the console keyboard. You should see:-
^C Server exit requested. |
If LANprint/PC has any clients, it will not exit until they are disconnected. Instead, you will see the following message:-
^C Server is Busy - <Control-C> again to force exit. |
It is possible to force LANprint/PC to exit, but it may not be able to complete the emergency shutdown tidily. Typing a second <Control-C> will produce the message:-
^C ERROR: Server exiting after <Control-C> |
Some extra manual tidying up may be necessary before
LANprint/PC can be run again.
7.5 Command Reference
This section describes the command line options that are supported by LANprint/PC. Invalid command items will cause LANprint/PC to exit after it displays an error message.
Command options are specified using a leading dash '-' or slash '/'
character, followed by a letter. Command line items that do not start
with either of these characters are considered to be resource names.
7.5.1 Displaying the Usage Message
The program's usage message can be obtained either by running
LANprint/PC with no command line items, or by using the help
option "-?". In either case, LANprint/PC will display the help
screen and will then exit.
7.5.2 Shared Resource Names
Any redirected printer can be used by LANprint/PC. Typically, this means LPT1, LPT2, and LPT3. Any or all of these devices can be shared on the network by LANprint/PC. This is done simply by adding the name(s) of the shared devices to the LANPRINT command line.
For example:-
C:\>lanprint lpt1 lpt2 lpt3 |
This example shares all three printers. LANprint/PC assumes that any necessary redirections have already been set up.
LANprint/PC will not allow two clients to print to the same resource at the same time. This prevents print files from being mixed up. If a second client attempts to print to a resource that is already busy, LANprint/PC will return a printer busy error to the client and will display an error message on the console. Most clients will retry after a short delay. When the printer comes available, the second client will be able to continue with the print job.
It is normally possible to redirect two or more devices to the same remote print server. This can make better use of the LANprint/PC gateway by allowing more users to access the print server.
LANprint/PC does not know where devices have been redirected, so it can't share an idle LPT1 to a client that wants a busy LPT2. |
The resource name syntax is very machine-specific. It requires a client to know which device has been redirected to a particular printer. This is not particularly user-friendly, so the concept of an alias has been introduced to allow more meaningful names to be used.
This also allows the LANprint/PC configuration to be changed from day to day without upsetting the clients.
Alias names can be supplied for each of the shared resources by following the name by an equals '=' and the alias. There must not be any intervening space or tab characters.
For example:-
C:\>lanprint lpt1=print lpt2=laser lpt3=draft |
Here, device LPT1 is given the alias "PRINT", LPT2 is "LASER", and LPT3 is "DRAFT". To access LPT2, a client has to connect to network path \\LANPRINT\LASER. When this is done, the device names themselves (LPT1 etc.) are not visible to network clients.
Resource aliases are limited to a maximum of sixteen characters. There cannot be any embedded spaces inside the names or aliases.
If the "-V" verbose option is selected (see below),
LANprint/PC will display the names of local print resources,
their aliases, and the network path required to access them, as it
starts up.
7.5.4 Adapter Number
This option is used to specify which of several NetBIOSs is to be used. The default value for the adapter number is 0 ("-A:0").
LANprint/PC will use the same adapter number for ALL NetBIOS connections.
For example:-
C:\>lanprint lpt1 lpt2=laser -p:secret lpt3=draft -a:2 |
LANprint/PC will allow adapter numbers in the range 0 to 9
inclusive. Values outside this range will be ignored, and the default
value (0) used instead.
7.5.5 Buffer Size
When a client connects to a shared print resource, LANprint/PC replies with the maximum size of message that it can accept. This option allows control over the size of these messages. The default value ("-B:4136"), is a multiple of 512 bytes, plus an allowance for the 40 byte SMB protocol header which is used on all messages. This general rule should be used for constructing alternative buffer sizes, as it provides optimal performance.
This option can be used to reduce the memory requirements of LANprint/PC. The data buffers make the largest demands on available memory.
For example:-
C:\>lanprint lpt1 -b:512 |
The value supplied should be in the range 512 to 8240. Values outside this range will be ignored, and the default value used instead. The option itself can be in any position on the command line. The value will be used for all sessions.