SpoolCmd: Difference between revisions

From BR Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 42: Line 42:
*[[SpoolFile]]
*[[SpoolFile]]
*[[SpoolPath]]
*[[SpoolPath]]
==Config Spoolcmd==
As of 4.3, the [[CONFIG]] command supports the SPOOLCMD spec, which enables any system spooler to work with BR. See the "SPOOLCMD" specification in the BRConfig.sys Specification section for additional information. On DOS and NetWork versions, OPENs to PRN: will return error [[6298]] when the following two conditions are true:
:1) SPOOLCMD is not specified
:2) The printer is not ready.


<noinclude>
<noinclude>
[[Category:Config]]
[[Category:Config]]
</noinclude>
</noinclude>

Revision as of 19:37, 27 July 2015

SPOOLCMD is mainly useful for producing print files for Linux and MAC systems. In Windows systems the DIRECT://printer-name is preferred. Also see the PRINTING section.

Basically, SpoolCmd provides a description of how to print data sent to the printer.

Business Rules supports independent spoolers on all systems. The BRConfig.sys SPOOLCMD specification will make a shell call to issue the necessary spool command whenever printing is done. When this is invoked the spooler is responsible for removing the spool file created by Business Rules.

The spool command and its parameters can be specified in a CONFIG command or in the BRConfig.sys file as follows:

Business Rules can also make substitutions as follows in parameters specified with SPOOLCMD:

[SPOOLFILE] substitutes the name of the spool file, as determined by Business Rules.

[NAME=] substitutes the name of the printer file as specified in the OPEN display statement's NAME= string. For example, PRN:/10.

[QUEUE] substitutes the queue name as specified in the OPEN display statement. In the following example, "queue" would be substituted for [QUEUE]: PRN:queue/10.

[PRINTER] substitutes the "printerclass" string as specified in the OPEN display statement. For example, PRN:/printerclass.

[COPIES] substitutes the value of the COPIES= parameter as specified in the OPEN display statement.

[WSID] substitutes the user's workstation ID.

[PROGRAM] substitutes the name of the program that is loaded at the time that the printer is closed.

The [QUEUE] and [PRINTER] parameters can be used almost interchangeably. They are simply a versatile way to pass specifications from the Open (or SUBSTITUTE) statement to the spooler.

NOTE: The spoolfile created by Business Rules will not automatically be deleted.

SPOOLCMD supports the -w flag which avoids the use of a DOS shell command when calling Windows applications directly. The Windows Client SPOOLCMD syntax is:

  SPOOLCMD [@] [-w] command  parm-1 parm-2 ...

SPOOLCMD honors BR drive substitution on the command itself, for example:

 DRIVE  J:,M:\myapp,j,\
 SPOOLCMD J:\mylib\spooler [SPOOLFILE] [COPIES]

This finds 'spooler' in M:\myapp\mylib.

See also:

Config Spoolcmd

As of 4.3, the CONFIG command supports the SPOOLCMD spec, which enables any system spooler to work with BR. See the "SPOOLCMD" specification in the BRConfig.sys Specification section for additional information. On DOS and NetWork versions, OPENs to PRN: will return error 6298 when the following two conditions are true:

1) SPOOLCMD is not specified
2) The printer is not ready.