PRO/5 Printers Under the UNIX Operating System

Spooling Printer Output

Spooling under UNIX operating systems is supported by using a "pipe" for the output device instead of a physical device. As an example:

alias LP ">lp -s 2>/dev/null" "132 column printer" cr

Make sure that the spooler does not remove special device control sequences from the printer output stream. If this occurs, it will not be possible to control the width of the printed line or handle the expanded print modes on the printer.

modes

As an example of the use of a mode string under the UNIX operating system, suppose your spooler is called "lp" and the system flag to be used for designation of number of copies is -c, then your printer ALIAS line would look like this:

ALIAS LP ">lp -c$COPIES" "Spooler" CR,COPIES=1

On an OPEN of the device LP in PRO/5, a value is substituted for $COPIES and that value is sent to the spooler. The default value is found in the printer ALIAS line, set by COPIES=int. PRO/5 checks the user environment for a COPIES=int. If the environment variable is found, its value overrides the default value of the printer ALIAS line. Finally, using a MODE= with the OPEN of LP is also used to override the default value. The syntax in this example might be:

OPEN (7,mode="COPIES=3")"LP"

lockfile=path/filename

Lock files should be used on all printers that are shared but not spooled. See the "lock=path/filename" parameter section in Modes Common to All ALIAS Devices for more details.

The lock file protections will not work if a user is running as "superuser" or "root".