PicLan - Networking for Pick

(C) Copyright 1990-1998 Modular Software Corporation. All rights reserved.

Version 2.0.0.17 - February 28, 1998

   Goto:  Table of Contents   Index
Chapter:  1 2 3 4 5 6 7 8 9 10 11 12 13 14

10: PicLan Network Printing Functions

PicLan printing function have been expanded with the release of PicLan version 2. Versions of PicLan prior to this release do not support all of the functions described here.

The end of this chapter include a "how to" for most common printing paths and options.

10.1: General Printing Concepts

PicLan network printing involves a number of general printing concepts. These concepts are valid for all types of Piclan printing, but because of limitations within other environments, some of the concepts may not work for all environments.

10.1.1: Inbound Print Jobs

When a print job is destined for a Pick systems, it is received over the network by the PicLan SERVER-PROCESS. The SERVER-PROCESS is a PicLan program that runs on an unused port on each Pick system. Configuring PicLan to start a SERVER-PROCESS is optional, but if you intend on using PicLan network printing functions, you must have a SERVER-PROCESS running.

When the PicLan SERVER-PROCESS receives a network print job, it will re-spool the job into the normal Pick spooler. The job will be re-spooled with the correct H and/or S options and with the correct copy count. Information about who generated the job will be lost in that the Pick spooler does not include a job description field.

10.1.2: Outbound Print jobs

When a print job is destined to move from a Pick system, it is transmitted over the network by the PicLan SERVER-PROCESS. Again, you must have a SERVER-PROCESS running in order to process network print jobs.

The PicLan SERVER-PROCESS will periodically scan the Pick spooler looking for jobs in form queues setup with the PL-ASSIGN statement. The PL-ASSIGN statement can setup print queues to operate in one of two network "modes". These modes are normal and move.

In normal mode, the PicLan SERVER-PROCESS behaves much like a Pick system printer. A job will only be transferred to it's network destination when the job is closed and ready to be printed. If the job is spooled with HS options, the job will sit in the Pick spooler until released by a user. If the job has just an H option, then it will be transmitted across the network immediately, and the job will be retained in the Pick spooler as a printed hold job. If the job has no options, it will be transmitted across the network and then deleted. In any case, the job that is transmitted across the network is sent without any option letters.

In move mode, the PicLan SERVER-PROCESS does not behave like a Pick system printer. Instead of printing jobs, the SERVER-PROCESS moves jobs with options intact to a destination system. This means that a job spooled with HS options will be transmitted to it's destination with the HS option intact and then deleted from the source system. This network printing behavious is intended for destinations that understand hold jobs. A network destination that is another Pick host or a NetWare print queue are examples of destinations that know how to process hold jobs. Slave printers and Windows print queues are examples of destinations that do not understand hold jobs.

In addition to operating mode, the SERVER-PROCESS will interpret four different options which can be used singly or in combination:

These options are available to make it easier to co-exist with shared network printers that may not use the same leading form-feed idiom that Pick systems tend to use.

10.2: Network Printing Paths

PicLan supports a number of printing options for use over network connections. In general, the following printing paths are available:

Each of these printing methodologies involves differing network setups. Each setup is described independently.

10.2.1: Pick to Pick Printing

This type of printing is one of the easiest to implement. Because both the source and destination are Pick print spoolers, the greatest compatibility with print jobs and Pick spooler operations are maintained.

In order to use Pick to Pick Printing, you network must be configured with:

With Pick to Pick printing, you can elect to use either normal or move mode. In normal mode, hold jobs will stay on the host system's spooler. In move mode, hold jobs will move to the destination system's spooler.

10.2.2: Pick to DOS Services Gateway Printing

This type of printing requires a PicLan DOS Services Gateway. Depending on the types of printer paths involved, you may elect to use either the DOS-hosted or Windows-hosted PicLan DOS Services Gateway programs. The following chart lists the possible DSG print destinations and which DSG implementations support them:

                                    --  PL-DSGW  -- PL-DSG32
                               DOS  3.1 WFW  95  NT   95  NT
    
    NW Print Queue (bindery)   YES  yes YES YES YES   no  no
    NW Print Queue (NDS)        no  yes yes yes yes   no  no
    NW Print Queue (via path)   no   no  no  no YES  YES YES
    NW Print Queue - WIN        no   no  no YES YES  YES YES
    DSG LPT hardware device    yes   no  no  no  no   no  no
    DSG COM hardware device    yes   no  no  no  no   no  no
    DOS network path           yes  ??? ??? ??? ???   no  no
    DOS Shelled Command        yes   no  no  no  no   no  no
    Windows LPT attached queue  no  yes YES  no  no  YES YES
    Windows COM attached queue  no  yes YES  no  no  YES YES
    Windows named printer - WIN no   no  no YES YES  YES YES
    Windows local path          no   no  no  no YES   no YES
    Windows local path - WIN    no   no  no YES YES  YES YES
    Windows network path        no   no YES YES YES  YES YES
    Windows network path - WIN  no   no  no YES YES  YES YES
Description including WIN use the Windows 95/NT print spooler to respool the print job.

Descriptions in all capital letters were tested on in-house systems at Modular Software. The test client systems included:

Here are the descriptions of each type of DSG destination:

NetWare Print Queue (bindery)

PicLan can print directly into NetWare print queues using NetWare supplied DOS or 16-bit Windows APIs. This interface supports copy count and HS option support along with inclusion of Pick generating port numbers and accounts in the job's description fields. This type of printing is specified by using the following format of the PL-ASSIGN command:

    PL-ASSIGN #=dsgname!NWServerName/NWQueueName:0{:options}{!SpoolOptions)
options are:

Both options may be specified together as FB.

SpoolOptions are:

Mulitple SpoolOptions may be specified seperated by spaces. These spool options are availble with any PL-ASSIGN routing.

In order to print to NetWare bindery print queues, your DSG system must have one of the following NetWare clients installed:

Clients for Windows 95 and Windows NT supplied by Microsoft do not support PicLan printing functions to NetWare print queues (you can use network path printing instead).

Your workstation must also be logged into each NetWare server that host a print queue with an active licensed attachment and with "user" security priviledges for the specified print queues.

NetWare Print Queue (directory services)

This description works with the 16-bit DSG only. You must install Novell clients in order to use these functions. If you are using a Windows 95 or Windows NT DSG, this method is obsolete and you should print through the Windows spooler instead.

PicLan can print directly into NetWare directory services print queues using NetWare supplied 16-bit Windows APIs. This interface supports copy count and HS option support along with inclusion of Pick generating port numbers and accounts in the job's description fields. This type of printing is specified by using the following format of the PL-ASSIGN command:

    PL-ASSIGN #=dsgname!NDS QueueName:0{:options}{!SpoolOptions)
options are:

Both options may be specified together as FB.

SpoolOptions are:

Mulitple SpoolOptions may be specified seperated by spaces. These spool options are availble with any PL-ASSIGN routing.

In order to print to NetWare bindery print queues, your DSG system must have one of the following NetWare clients installed:

Only the windows version of the DSG currently supports directory services printing functions.

Clients for Windows 95 and Windows NT supplied by Microsoft do not support PicLan printing functions to NetWare print queues (you can use network path printing instead).

Your workstation should be logged into directory services on the same tree as the print queues are located (PicLan does not support printing to non-attached directory trees). When a print job is generated to a print queue, the DSG will automatically attach, authenticate, and license a connection to the NetWare server that hosts the specified print queue. The DSG users does need to have adequate priviledges as a queue user that can add and delete print jobs.

NetWare Print Queue (via network path)

You may specify NetWare print queues on some platforms by specifying the PL-ASSIGN command:

    PL-ASSIGN #=dsgname!//NWServerName/NWQueueName{!SpoolOptions}
This type of printer redirection does not support the passing of H or S options. Copy count is implemented by sending the job multiple times in sequence to the print queue.

DSG LPT Hardware Device

The DOS versions of the PicLan DSG will allow spooling to local LPT devices. This support is implemented as a low-level interface to the system BIOS printer interfaces and as such is not intended for use with subsequent printer re-direction. The PL-ASSIGN syntax for this printer redirection is:

    PL-ASSIGN #=dsgname!LPT#:{!SpoolOptions}
This type of printer redirection does not support the passing of H or S options. Copy count is supported by sending the job to the destination device multiple times.

DSG COM Hardware Device

The DOS versions of the PicLan DSG will allow spooling to local COM devices. This support is implemented as low-level interrupt driven device drivers that directly access the COM port's UART hardware. The PL-ASSIGN syntax for this printer redirection is:

    PL-ASSIGN #=dsgname!COM#:{!SpoolOptions}
This type of printer redirection does not support the passing of H or S options. Copy count is supported by sending the job to the destination device multiple times.

The communications parameters for each COM device is specified in the PL-CFG.INI file. The first (and thus default) values for baud rate, parity, etc. are used to initialize the COM port for printing purposes.

DOS Network Path

The DOS and Windows versions of the DSG will allow spooling to network path destinations in the form //server/queue by making standard DOS file open and write calls. If you underlying network supports this type of calling convention, the PicLan DSG may be able to print to it. The PL-ASSIGN syntax for this printer redirection is:

    PL-ASSIGN #=dsgname!//Server/Queue{!SpoolOptions}
This type of printer redirection does not support the passing of H or S options. Copy count is supported by sending the job to the destination device multiple times.

DOS Shelled Command

The DOS version of the PicLan DSG will support shelling DOS commands when inbound print jobs are received. This support is implemented as general support for other types of network print queue functions for which no other method of redirecting printing can be accomplished. Because of the nature of this command, operational limitations exist including:

The shelled command must complete reasonably quickly and without operator intervention.

The shelled command must be reliable.

The PL-ASSIGN syntax for this printer redirection is:

    PL-ASSIGN #=dsgname!EXEC command string{!SpoolOptions}
The command string can include the following special character sequences:

The DOS Shelled Command does support the H or S spooler options nor the copy count options.

Windows LPT Attached Queue

The Windows version of the PicLan DSG will support printing to Windows LPT devices using the Windows API SpoolFile(...) function. This allows a Pick process to print to any locally attached printer with an LPT device "connected" to it. This method should only be used with Windows 3.x platforms.

Windows NT does not implement this function. Windows 95 does implement this function, but the temporary spoolfile will not be deleted.

Under Windows 95, you must setup your printer as "capturing" the specified LPT port for DOS-style applications.

The PL-ASSIGN syntax for this is:

    PL-ASSIGN #=dsgname!LPT#:{!SpoolOptions}
This type of printer redirection does not support the passing of the H and S options. Copy count is supported by sending the job to the destination device multiple times within a single print job.

Windows COM Attached Queue

The Windows version of the PicLan DSG will support printing to Windows COM devices using the Windows API SpoolFile(...) function. This allows a Pick process to print to any locally attached printer with a COM device "connected" to it.

This printing methodology has the same limitations as printing to an attached LPT queue.

Under Windows 95, you must setup your printer as "capturing" the specified COM port for DOS-style applications.

The PL-ASSIGN syntax for this printer redirection is:

    PL-ASSIGN #=dsgname!COM#:{!SpoolOptions}
This type of printer redirection does not support the passing of the H and S options. Copy count is supported by sending the job to the destination device multiple times within a single print job.

Windows Named Printer (through the WIN spooler)

The Windows version of the PicLan DSG supports printing to local Windows printers by name.

This function is only available with Windows 95 and Windows NT systems and requires 32-bit PicLan drivers (PicLan on Windows 95 with PL-DEV loaded will not function).

The PL-ASSIGN syntax for this printer redirection is:

    PL-ASSIGN #=dsgname!WIN printer_name{!SpoolOptions}
This type of printer redirection does not support the passing of the H and S options. Copy count is supported by sending the job to the destination device multiple times within a single print job.

This type of printer support allows PicLan to print to nearly any printer that Windows can print to. Simply install a printer driver in Windows and let PicLan print through that driver.

Windows Printer by device name (through the WIN spooler)

The Windows version of the PicLan DSG supports printing to local Windows printers by their device name

This function is only available with Windows 95 and Windows NT systems and requires 32-bit PicLan drivers (PicLan on Windows 95 with PL-DEV loaded will not function).

The PL-ASSIGN syntax for this printer redirection is:

    PL-ASSIGN #=dsgname!WIN device_name{!SpoolOptions}
This type of printer redirection does not support the passing of the H and S options. Copy count is supported by sending the job to the destination device multiple times within a single print job.

This option uses the same code as printing to a Windows printer by name through the WIN print spooler, but allows you to specify the device by device name instead of by printer name.

Windows Local Path

The Windows version of the PicLan DSG will support printing to local shared printers by specifying the network path name. This function does not work with Windows for Workgroups or with Windows 95 because of limitations within these version of Windows. The PL-ASSIGN syntax for this printer redirection is:

    PL-ASSIGN #=dsgname!//LocalServer/Queue{!SpoolOptions}
This type of printer redirection does not support the passing of the H and S options. Copy count is supported by sending the job to the destination device multiple times within a single print job.

Windows Local Path (through the WIN spooler)

The Windows version of the PicLan DSG will support printing to local shared printers by specifying the network path name by passing the job through the Windows 95 or Windows NT print spooler. By passing the print job through the local Windows print spool engine, this function does work with Windows 95. The PL-ASSIGN syntax for this printer redirection is:

    PL-ASSIGN #=dsgname!WIN //LocalServer/Queue{!SpoolOptions}
This type of printer redirection does not support the passing of the H and S options. Copy count is supported by sending the job to the destination device multiple times within a single print job.

Windows Network Path

The Windows version of the PicLan DSG will support printing to network shared printers by specifying the network path name. This function (unlike local printers) does work with Windows for Workgroups. The PL-ASSIGN syntax for this printer redirection is:

    PL-ASSIGN #=dsgname!//Server/Queue{!SpoolOptions}
This type of printer redirection does not support the passing of the H and S options. Copy count is supported by sending the job to the destination device multiple times within a single print job.

Windows Network Path (through the WIN spooler)

The Windows version of the PicLan DSG will support printing to remote shared printers by specifying the network path name by passing the job through the Windows 95 or Windows NT print spooler. By passing the print job through the local Windows print spool engine, this function does work with Windows 95. The PL-ASSIGN syntax for this printer redirection is:

    PL-ASSIGN #=dsgname!WIN //RemoteServer/Queue{!SpoolOptions}
This type of printer redirection does not support the passing of the H and S options. Copy count is supported by sending the job to the destination device multiple times within a single print job.

10.2.3: DOS Services Gateway to Pick Printing

The DOS version of the DSG as well as the Windows version of the DSG running with NetWare clients support servicing NetWare print queues and sending them to the Pick spooler. This type of printing is configured in the PL-CFG.INI file by specifying:

    [DosServicesGateway]
    PrintQueue=queue1 queue2 ...
    Queue1In=Server\Queue:form
    Queue1Out=PickHost!QueueNumber
    ...
This type of printing does support the HS options (user Hold in NetWare terms) as well as copy counts.

NetWare Configuration for Printing

When running in a NetWare environment, the DOS Services Gateway should have its own LOGIN user name on each of the NetWare file servers. This will allow you to set up the proper NetWare security permissions for the Gateway to operate. Use the SYSCON utility to create the Gateway's user name.

In order to have print jobs move from a NetWare print queue to a Gateway print queue, the Gateway must be able to service print jobs from NetWare print queues. Normally, print servers are configured using the NetWare PCONSOLE utility. However, the DOS Services Gateway must LOGIN to each NetWare file server as a normal user, and the PCONSOLE utility can't be used to add normal users as print servers. The PicLan PLMKPS.EXE utility is provided to do this. This syntax of PLMKPS is as follows:

    PLMKPS user_name queue_name ...
PLMKPS will make the specified user name a print server for the specified queues. Only a single user name may be specified for each execution of PLMKPS, but multiple queue names may be listed. Queue names can also contain wild cards, so that, for example, the command

    PLMKPS dsg1 *
could be used to make the NetWare user DSG1 a print server for all of the print queues currently defined on the file server.

You must be logged in as SUPERVISOR on the file server to run PLMKPS. PLMKPS will list all of the queues it will act upon, and prompt whether it should take any action or not.

In order for print jobs to be moved to a NetWare print queue from a Gateway, the Gateway's NetWare user name must be given queue user and queue operator rights on the target print queues. Use the PCONSOLE utility to do this.

When running the Gateway, the Gateway machine should be logged in to all of the necessary NetWare file servers before the PL-TERM.EXE program is run. You may wish to develop special AUTOEXEC.BAT and login script files for the Gateway so that it automatically performs all of the needed actions.

10.2.4: PL-DEV TSR to Pick Printing

The PL-DEV DOS TSR (Terminate and Stay Resident program) can redirect LPT devices from DOS to Pick spooler form queues. The SYNTAX to setup this printing is:

    PL-DEV
    PL-PRN LPT#:=PickHost!QueueNumber {/CopyCount} {/h} {/s} {/t##} {/u} {/i} {/n} {/f} {/?}
The options are:

This TSR is desinged to be used from DOS only. It's use from within Windows 3.1 or Windows for Workgroups is unpredictable at best. It's use within Windows 95 is impossible in many driver configurations. It's use with Windows NT is not possible in any configuration.

10.2.5: Pick to PL-DEV TSR Printing

The PL-DEV DOS TSR (Terminal and Stay Resident program) can receive print jobs from a Pick host and print them on a local LPT device. The syntax to load and activate PL-DEV for this function is:

    PL-DEV
    PL-SPRN LPT#:=PRIMARY {/p##} {/t##} {/u} {/i} {/?}
or

    PL-DEV
    PL-SPRN LPT#:=SECONDARY {/p##} {/t##} {/u} {/i} {/?}
The options are:

This TSR is designed to print to true LPT local devices only. COM devices assigned to LPT devices will either perform very slowly or not work at all. Other software layers that capture LPT devices are probably not compatible with the PL-DEV TSR are usually do not run reliablly.

In order to print to the PL-DEV TSR, you execute a PL-ASSIGN command on the Pick host. There are two different styles of printing that can use the PL-DEV TSR as the receiving end of print jobs.

10.2.6: PicLan SLAVE Printing

With slave printing, the print job is sent to the network address of the workstation that generated the print job. This type of printing is easy to setup and requires little configuration on the Pick host. It is also a bit unusual because a print jobs spooled to a particular form queue may print on different printers depending on what port created the print job.

The syntax of the PL-ASSIGN command for this type of printing is:

    PL-ASSIGN #=SLAVE:0{!SpoolOptions}
    PL-ASSIGN #=SLAVE:1{!SpoolOptions}
The O or 1 specify the PRIMARY or SECONDARY printer on each workstation. A single workstation can have at most two printers controlled in this manner.

10.2.7: PicLan ROUTED Printing

With routed printing, the print job is sent to a particular network address. Because the PL-DEV TSR does not advertise as a network server, you must specify the actual network address as a part of the PL-ASSIGN command. You can also execute the PL-ASSIGN command from the workstation where PL-DEV is loaded and specify HERE to same some complicated typeing.

The syntax of the PL-ASSIGN command for this type of printing is:

    PL-ASSIGN #=PL-RPRN!ImmAddr:NetNumber:NodeAddr:PrinterNumber{!SpoolOptions}
or

    PL-ASSIGN #=PL-RPRN!HERE:PrinterNumber{!SpoolOptions}
The fields in the addresses are:

10.3: Managing Network Printing - PL-SPOOL

The PL-SPOOL command is used to display and manipulate spooler print jobs that are destined for network printers. The PL-SPOOL command has the syntax:

    PL-SPOOL command {print job number}
Available commands are:

10.4: Time Sensitive Printing - PL-KICK-SERVER

Your application can use the PL-KICK-SERVER to reduce the amount of time that it takes a print job to transfer to it's destination over the network. The PicLan SERVER-PROCESS checks for outbound print jobs about every 30 seconds. In some environments (like Point Of Sale), 30 seconds may be too long to wait. In this case, you can include the TCL command:

    PL-KICK-SERVER
as a part of your print generation process immediately after the print job has closed. PL-KICK-SERVER provides a "hint" to the SERVER-PROCESS that it should check for outbound jobs immediately instead of waiting for the next 30 second interval.

10.5: Common Printing Configurations

Although may possible printer configurations are possible, the following configurations appear to be in common use:

10.5.1: Printing from Pick to Windows 95 and Windows NT

You can print from Pick to Win32 accessible printers with a single, simple configuration. With this configuration, you can use either the 16-bit (PL-DSGW) or 32-bit (PL-DSG32) DOS Services Gateway.

Use the PL-ASSIGN statement:

    PL-ASSIGN #=DSG!WIN printer_name or
    PL-ASSIGN #=DSG!WIN network_path or
    PL-ASSIGN #=DSG!WIN local_port
'printer_name" is the name of an installed Windows printer.

'network_path' is the share path to a network printer (ie. //server/printer).

'local_port' is the local port number for a printer (ie. lpt1:).

This style of printing is quite transparent and you can specify nearly any destination printer desired (with appropriate network permissions). It is also acceptable to use network share paths to access local printers (even under Win95).

This printing option also works with printer paths that are not "Windows" printers. You can specify printer paths to NetWare print queues using either bindery or NDS paths.

10.5.2: Printing from Pick to NetWare shared printer

Setup a DSG under either Windows or DOS

Use the PL-ASSIGN statement:

    PL-ASSIGN #=DSG!server/queue:0 or
    PL-ASSIGN #=DSG!NDS NDSqueue:0 (windows DSG only)
'DSG' is the name of the DSG system

'server' is the name of the NetWare server

'queue' is the name of the NetWare print queu

'NDSqueue' is the name of a Novell Directory Services print queue (either partial or fully specified)

You must only use the 16-bit versions of the Windows DSG to use this method.

10.6: Common PL-ASSIGN Options

10.6.1: Printing Pick to Pick

If you are printing Pick to Pick and wish to have hold jobs move from system to system, you should specify the MOVE option.

10.6.2: Printing Pick to NetWare

If you are printing from Pick to NetWare using the DOS or 16-bit Windows DSG and wish to have hold jobs move to the NetWare spooler, you should specify the MOVE option.

10.6.3: Printing to Laser Printers

If you are printing to a laser printer over the network, you should probably specify the SLFF and ATFF options to supress the blank page at the beginning of most print jobs and to eject the print job when completed.

10.6.4: Printing to Shared Non-laser Printers

Printing to shared non-laser printers may also work best with the SLFF and ATFF options because this more closely matches the behaviour of most network applications.

10.7: Printer Control Codes

You can optionally create control codes strings that will be printed before and/or after each print job that PicLan sends over the network. This is intended to allow a system administrator to setup print queues that automatically print using specific printer properties. Examples of this would be to:

The interface to enter printer control sequences is purely programatic. This means that a Pick programmer must actually write a Pick/BASIC program to build the interface strings as no end-user interface is required.

In order to include a sequence of characters at the front of a print job, you should write a Pick item that contains the characters you wish to include. The file that you write into is named PL.BP,DATA and the item is PRE*nn where 'nn' is the Pick print queue or form number.

In order to include a sequence of characters at the end of a print job, you use the item POST*NN.

Whenever you use printer control PRE strings, be sure to also use POST strings that return the printer to the default settings. If you do not do this, Pick printing operations may interfere with each other or with other network printing functions.


   Goto:  Table of Contents   Index
Chapter:  1 2 3 4 5 6 7 8 9 10 11 12 13 14