In addition to receiving files from devices, there are two ways to add PC and LAN files to the print spool: the Barr MOVE command and the Barr PRT utility. The preferred method is the PRT utility because it builds attributes for the file. The MOVE command does not build file attributes, but is a faster process.
The Barr MOVE command changes the location of a file by renaming the directory portion of the file name. The Barr MOVE command is similar to the DOS MOVE command but restricts the source and destination directories to residing on the same drive. If the file name already exists in the directory, you receive an error message. The Barr MOVE utility is found on the BARR/SPOOL software disk. The command to run the utility is executed from a DOS prompt as a DOS command.
The Barr PRT utility is included with the Barr software files. PRT can be run either in a menu-driven, interactive mode or in a batch mode. PRT allows you control over spooling criteria, such as Form, Class, and Priority. With these spooling criteria, you control the selection and routing of files to be printed.
Refer to Chapter 3, Installation, for instructions to install the PRT utility. Directions for configuring and operating the PRT utility follow.
The PRT utility is too large to run interactively in the DOS session of BARR/SPOOL. Instead, in the DOS session, you can run the batch mode.
The PRT utility uses control files to provide the BARR/SPOOL software with print instructions. The control file holds instructions such as the disposition of the file after printing, the form name to assign to the files, and printer commands such as lines-per-inch, lines-per-form, and print lines-per-form. A default control file, SPOOL.CTR, was included with the Barr software files. You can modify the default control file or create additional control files as needed. When creating additional control files, a good practice is to use .CTR as the extension of all control file names. Control files can be created and modified interactively or with an ASCII editor.
To use the PRT utility to interactively modify control files, take the following steps:
Step 1
Step 2
Step 3
Step 4
Step 5
To run the PRT utility, enter PRT at a DOS prompt. For example:
c:\BARR> PRT
Then, a listing of the current directory displays in a two-column format:
If the words Spool File near the bottom left of the screen are unreadable, you need to exit PRT and enter the MODE BW80 command from DOS before proceeding.
The message in the bottom left corner of the screen describes the action that PRT will take if ENTER is pressed while the command is highlighted. To select a command, use the arrow keys to highlight it, or type the first character of the command name.
Select Controls.
Select Modify Controls.
SPOOL directory
Directory in which the spool files are located. Include the drive name and full directory path. In most instances, this directory should be identical to the SPOOL directory defined in BARR/SPOOL.
Retain directory
Optional directory in which a copy of the file is retained after the file is copied to the print spool directory. Include the drive name and full directory path. When a Retain directory is specified (and Disposition is RENAME), a copy of the original file is placed there after copying to the print spool, and the file is deleted from its original directory.
This is not the same directory as the SPOOL Retain directory, discussed in Chapter 5, Print Spool Description. The difference is that a file is written to the PRT Retain directory upon copying to the spool directory. A file is written to the SPOOL Retain directory after the file prints.
Spool filename
File name to use in the destination SPOOL directory. If no name is specified, the source file name is used. The SPOOL directory path is added as a prefix before the Spool filename to form the complete path name.
The extension to the file name is a period followed by up to three characters. If the file name is followed by a period (.) alone, a blank extension is implied. If no period follows the filename, then a numeric extension is assigned. The software searches for that file name with a numeric extension and assigns the extension n+1, where n is the highest extension found. If no numeric extension is found in the directory, then extension .001 is assigned.
For an example of the automatic naming sequence, refer to File Name Extensions, Automatic Naming Sequence in section 6.5.
Disposition of file
Disposition of original file after copying into the SPOOL directory. Possible values are NOCHANGE, DELETE, and RENAME.
NOCHANGE
DELETE
RENAME
The same rule used for the SPOOL directory applies to automatic generation of numeric file extensions in the Retain directory to prevent duplicate file names.
Copies
Number of copies of the file to print.
Priority
Indicates the priority in which BARR/SPOOL prints files. Values range from 1 - 9, with 9 as the highest priority.
Class
Spooling class. Provides for grouping of similar files. BARR/SPOOL printers can process from one to five classes at once. Files can be directed to a particular printer by setting each file class to one being processed by only one printer.
State
Spooling state. Choices are READY and HOLD. If the file state is READY, the file is printed by BARR/SPOOL with no operator intervention. Files with a HOLD state will not be printed until the state is changed. Setting the state to HOLD allows time for preparation, such as changing the paper on the printer before the file prints.
Printer control
BARR/SPOOL printer control string selector. Each printer has a table of control strings. This hexadecimal field is an index to the Printer Control Data table discussed in section 4.8. The control string associated with the index code is sent with the file to the printer. Control strings are commonly used to set printer lines-per-inch and fonts.
Formname
An 8-character form name. This often indicates pre-printed forms that must be mounted in the printer.
Fcbname
An 8-character FCBNAME.
Jobname
An 8-character JOBNAME.
Lines-per-inch
Number of print lines-per-inch. Commonly either 6 or 8.
Lines-per-form
Number of actual lines on the printer form. Includes top and bottom margins. For example, if the length of the printer form is 11 inches and line spacing is set to 6 lines-per-inch, the number of lines-per-form is 66.
Print-lines-per-form
Number of lines used for printing the form. Excludes top and bottom margins. Print-lines-per-form should always be less than or equal to Lines-per-form.
For example, if Lines-per-form is 66 and Print-lines-per-form is 60, then the printer skips over the last 6 lines as a page margin. A common use of the page margin is to leave 3 lines on each side of the paper perforation when using perforated paper.
Use file separator headers
Yes
A file separator header page can be used to identify printed files. The jobname can be included on the header page by entering an appropriate identifier in the JOBNAME field.
No
To exit the Spool Controls window, press ESC at any time or press ENTER while the last field is selected. This brings you back into interactive PRT with your changes to the parameters active. Now you can save the active parameters to a control file.
Select Controls.
Select Save Controls.
Enter the file name for the control file or accept the displayed name by pressing ENTER.
For this file to become the default control file, it must be named SPOOL.CTR and it must reside in the same directory as the PRT program files (PRT.EXE and PRTMENU.EXE). Upon startup, PRT searches for SPOOL.CTR in the current directory first, followed by the directory containing the PRT program file. This allows each user to set their own defaults if desired.
Spool control files also can be generated and maintained manually. However, you should not attempt this method unless you are proficient with an ASCII program editor.
A sample control file generated using an ASCII editor follows:
Specify only those parameters you want to change from the default values in SPOOL.CTR.
The format of each parameter is:
Keyword Value
Separate the values from the keywords with one or more spaces or tabs. Only one keyword and its associated value can be entered on each line. Each line is read for a keyword first, then the value.
The order of the parameters in the control file is not important. Lowercase letters are converted to uppercase, so mixed case has no effect.
If there is no legal keyword on a line, or the line contains an invalid value, the line is ignored and an error message is displayed when you run the control file.
When creating additional control files, a good practice is to use .CTR as the extension of all control file names.
The PRT utility has a batch mode which allows you to spool files with command line options for the control parameters. You can spool a file using the default SPOOL.CTR parameters, using an alternate control file, or overriding individual parameters in a control file.
The command to run PRT in batch mode is entered at a DOS prompt. The syntax of the command is:
PRT myfile.txt @controlfile parameter=value
where
myfile.txt
File to add to the print spool.
controlfile
Optional. Control file to use. If no control file is specified the default SPOOL.CTR parameters are used.
parameter
Optional. Parameter to override. You can override as many control file parameters as needed. Refer to Table 11-1 for a list of control file parameters that can be overridden. Only the first three characters of each parameter are required.
Table 11-1. Spool Control Parameters
Parameter |
Description |
Maximum Length |
Valid Values |
SPOOLDIR |
Spool directory |
64 |
DOS directory |
RETAINDIR |
Retain directory, if file is to be retained after printing |
64 |
DOS directory |
DESTNAME |
File name to use in spool directory |
12 |
DOS filename |
DISPOSITION |
Disposition of file after moving to the spool |
8 |
Nochange, Delete, Rename |
COPIES |
Number of copies to print |
4 |
1 - 9999 |
PRIORITY |
Priority to be assigned to file |
1 |
1 - 9 |
CLASS |
Class to be assigned to file |
1 |
A - Z, 1 - 9 |
STATE |
State to be assigned to file |
5 |
Ready, Hold |
CONTROL |
Printer Control string to be sent with file |
2 |
Hex code |
FORMNAME |
Form to be used to print file |
8 |
DOS filename with no extension |
FCBNAME |
FCB name associated with the file |
8 |
Valid FCB name |
JOBNAME |
Job name associated with the file |
8 |
Valid job name |
LPI |
Lines-per-inch setting for printer |
1 |
1 - 9 |
LPF |
Lines-per-form setting for printer |
3 |
1 - 999 |
PLPF |
Print-lines-per-form setting for printer |
3 |
1 - 999 |
HEADERS |
Use file separator header page to identify printed files |
3 |
Yes, No |
To add the file REPT5.TXT to the print spool using the default control file SPOOL.CTR:
PRT REPT5.TXT
To add the file SEPT.001 to the print spool, with the number of copies set to 5 and the formname set to CHECK. The default parameters from SPOOL.CTR are used for all parameters other than COPIES and CHECK:
PRT SEPT.001 COP=5 FORM=CHECK
To add the file MYLIST to the print spool, with the number of copies set to 10 and using the parameters from the control file, LISTING.CTR, for all parameters other than COPIES:
PRT MYLIST @LISTING.CTR COPIES=10
When run interactively, PRT lists the current directory on screen, allowing you to view files and move among directories before printing.
To access the PRT utility in interactive mode, enter the command PRT at a DOS prompt. For example:
C:\BARR> PRT
The PRT screen displays:
You can use the following commands to drive the PRT utility:
Spool File
Submit a file to the print spool. There are two options. You can select a file from the list on the screen with the Select file from list option. Or, you can enter the file name through a dialog box with the Enter filename option. The file name entry screen accepts the DOS wildcard characters * and ?.
Controls
Modify the spool control parameters. You can load an alternate set of parameters from a file or save modified parameters to a file.
File Directory
Change the file directory you are viewing. The current directory is displayed at the top of the screen.
View File
Display a file on the screen. You can select a file from the list or enter the file name. The file name entry screen accepts the DOS wildcard characters * and ?.
DOS
Leave the PRT screen temporarily to go to the DOS session. You can return to PRT by typing EXIT at the DOS prompt.
Quit
Exit the PRT utility. When you highlight Quit, the version of the program displays in the lower right corner. Then, you can press ENTER to exit the PRT utility.
Spool Command
Select Spool File.
Choose Select file from list.
Select the desired file, in this example SCREEN2.LST.
Press ENTER or ESC.
If you select Enter filename from the Spool File menu, you are prompted to enter the file name.
Enter the name of the desired file.
File Directory Command
Select File Directory.
Enter the drive and name of the new directory (in this case, C:\CHECK).
Enter a filename template for restricting the display to certain files. The default is *.* to display all files.
The top of the screen indicates the new directory.
The list of files in the new directory displays.
View File Command
Select View File.
To specify the file name manually, select Enter filename.
Enter the name of the file you wish to view (in this case a:\screen.idx).
Use the HOME, END, PAGE UP, and PAGE DOWN keys to examine the contents of the file. The HOME and END keys move you to the beginning of the file and the end of the file, respectively.
Press ESC to return to the PRT screen.