Using the PRT utility

BARR/SPOOL

The Barr PRT utility is the command-line version of the BARR/SPOOL Print Utility. With the PRT utility you can copy files from the computer or LAN to the Spool Window, specify a spool control file, and preset the spool header attributes for each file. Because you can call the PRT utility from another program, PRT gives you remote control over spooling criteria, such as form, class, and priority.

See also:


Command syntax

The MS-DOS prompt must be pointing to the directory where the PRT utility is located, (\\Program Files\Barr\Spooler\Exe folder, unless an alternate path was specified during installation). Because of a 9-argument limitation in DOS command-line batch files, we recommend using quotation marks around all parameters so you can use the maximum number of arguments. Parameters that contain spaces must be surrounded by quotation marks, (for example, "@C:\My Control Files\spool.ctr" and "NDHGFORM=MY FORM"). The command syntax is case sensitive.

Enter the following command at the MS-DOS prompt.

PRT "filename" "-ffiletype" "@controlfile" "field=value"

filename – The name and full or partial path of the file to send to spool. The syntax can include the * and ? characters.

filetype – The following file types are accepted:

controlfile – The name and full or partial path of the control file. You can use the default spool control file (spool.ctr) or use this switch to specify a different control file.

field=value – The header field and the value you want to preset. This will override any value set in the control file. Although all Barr header fields will work, these are examples of common fields.

Examples

The following examples are provided to show the proper syntax for the spooling files with the PRT utility.

Example 1

PRT "Report5.txt"

Adds the Report5.txt file to the print spool and uses the values from the control file specified on the Manual Spooling tab.

Example 2

PRT "C:\My Files\Sept.001" "NDHGCLAS=Z" "NDHGFORM=CHECK"

Adds the Sept.001 file to the print spool, sets the class to Z, sets the form name to CHECK, and uses the values from the default control file (spool.ctr) for all other options.

Example 3

PRT "Mylist.txt" "@C:\My Control Files\listing.ctr" "NJHGJCPY=10"

Adds the file Mylist.txt to the print spool, sets the number of copies to 10, and uses values from the listing.ctr control file for all other options.