SpoolCmd: Difference between revisions
(Created page with "Also see the PRINTING chapter. Business Rules supports independent spoolers on all systems. The BRConfig.sys SPOOLCMD specification will make a shell call to issu...") |
No edit summary |
||
Line 5: | Line 5: | ||
The spool command and its parameters can be specified in a CONFIG command or in the BRConfig.sys file as follows: | The spool command and its parameters can be specified in a CONFIG command or in the BRConfig.sys file as follows: | ||
[[file:Spoolcmd.png]] | [[file:Spoolcmd.png|750px]] | ||
Business Rules can also make substitutions as follows in parameters specified with SPOOLCMD: | Business Rules can also make substitutions as follows in parameters specified with SPOOLCMD: |
Revision as of 19:56, 4 April 2013
Also see the PRINTING chapter.
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.
[WSID] substitutes the workstation ID as specified at start-up or by the BRConfig.sys WSID spec.
[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.
The following is an example of the SPOOLCMD specification used with the WBSPOOL utility (see WBSPOOL.EXE in the Other Changes/Enhancements section for more information:)
SPOOLCMD wbspool -Q[PRINTER] -E [&ERRNO][SPOOLFILE]
NOTE: The spoolfile created by Business Rules will not automatically be deleted.
On DOS and Windows, if CONFIG SPOOLCMD is not specified, opens to PRN: will return error 6298 if the printer is not ready.
SPOOLCMD now supports the -w flag which avoids the use of a DOS shell command when calling Windows applications directly. The new SPOOLCMD syntax is:
SPOOLCMD [@] [-w] command parm-1 parm-2 ...
SPOOLCMD now 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: