BARR/SPOOL manual

1. Introduction

The spooling process begins when you set up your Barr PC to receive files. Parameters entered from the Installation Description screens define to BARR/SPOOL the devices you are using, the flow of files to printers, and the initial assignment of file and printer attributes.

The Installation Description screens present numerous configuration choices. Understanding the following spool concepts will help you decide which of the many configuration options to use.


1.1 Spool Concepts

You already know that you want to send files to printers, but you may not realize the importance of file and printer attributes in getting the files to the printers. While files and printers are the bricks of print spooling, file attributes and printer attributes are the mortar. BARR/SPOOL maintains attributes for each file in a record at the top of the file called a file header. (The file header is described in detail in section 1.2.) File attributes describe the file and how it is to be printed. For example, the Copies attribute tells how many copies of the file to print.

Before a file can print, its attributes must match a printer’s attributes. Printer attributes describe the status of the printer and are used to select files for printing. Printer attributes are preset in the BARR/SPOOL software and are maintained on the Print Spool screen.

BARR/SPOOL provides three different ways to set file attributes. You can set file attributes:

How and when you set the file attributes determines how, when, and where the file prints.

Before the File is Sent to the Print Spool

Before the file is sent, the user, who is usually most familiar with the contents of the file, has the opportunity to set the attributes for the file.

File Attributes Set by PRT Files from DOS sources, such as the LAN and the PC, can be added to the print spool using the PRT utility or the DOS copy command. The PRT utility is the preferred method because it sets file attributes. The PRT utility is included with the Barr software files. It can run in either a menu-driven, interactive mode or in a batch mode. Users may have individual copies of the PRT utility on their PCs or they can share a network copy of the utility.

The PRT utility lets you set all file attributes (see Table 1-1). Adding file attributes before the file is sent to the print spool makes management of the print spool easier. Attributes such as Form and State tell the print spool operator which actions to take before printing the file or enable the file to print automatically.

File Attributes Set by Data in the File When using the BARR/PRINT for TCP/IP, PRINT/TWINAX, or BARR/PRINT for LAT option for BARR/SPOOL, you can use an Output statement to specify file attributes. The Output statement is added to the data in the file. When BARR/SPOOL receives the file, it searches for the Output statement. After if finds the Output statement and reads the file attributes, BARR/SPOOL deletes the Output statement from the file so that it is not part of the print-out of the file.

When the File is Received by the Print Spool

BARR/SPOOL has several features that allow it to change or add attributes, according to preset criteria, as a file is being placed in the spool directory.

Receiving vs. Copying Files Files are placed in the spool directory either when they are received or copied.

The term received applies only to BARR/SPOOL with options. When using the BARR/PRINT for TCP/IP, PRINT/TWINAX, or BARR/PRINT for LAT option, files originate from a host computer (an AS/400 or a VAX). As host files are received and processed by BARR/SPOOL, both the file attributes and the file format may be changed.

By contrast, the PRT utility simply copies files from the PC or LAN to the print spool directory, then updates the file header with attribute information.

File Attributes When a file is added to the print spool by the PRT utility, attributes that were set by PRT are added to the file header.

As files from host sources such as an AS/400 or VAX are received, BARR/SPOOL processes them. During this processing, file attributes can be changed. If an Output statement is specified in the data, values in the Output statement are translated to file attributes. The Spool Header from Data parameter also can be used to build the file header using data within the file.

BARR/SPOOL makes one final check of both copied and received files before adding them to the print spool. It checks the attributes of the files against the File Attribute Table and makes changes as specified in the table. These changes can override attributes that were set by the PRT utility or when a host file was received.

File Format Files from a PC or LAN undergo no format conversion. However, files received from a host are processed by BARR/SPOOL. This processing includes a format conversion when you specify a receive mode in the BARR/SPOOL parameters.

A receive mode tells BARR/SPOOL to perform a format conversion of the data in the file. You can use a receive mode to convert ASCII data to EBCDIC format, or to convert EBCDIC data to ASCII format. The receive mode you choose should be based on the printer that will print the file. EBCDIC data prints only on S/370 (channel-attached) printers. ASCII data prints on ASCII (PC) printers.

Before the File Prints

The printing of files can be a completely automated process or it can require user intervention. It is up to you. Once a file is in the print spool, it will print automatically when the file attributes match a printer’s attributes. If the file attributes do not match a printer’s attributes, either the file attributes or the printer attributes must be changed before the file can print.

A file prints when a printer is available and the file’s:

You control the printing of files using the Print Spool screen to change file and printer attributes. For example, if you load a paper form for checks on printer LPT1, then you should change the Form attribute of LPT1 to CHECKS. This prevents any file with a Form attribute other than CHECKS from printing on LPT1 and signals BARR/SPOOL to send files with a Form of CHECKS to LPT1.

The attributes of a print spool file are compared to the attributes of the Spool printer. When the Form and Class for the file match the Form and Class of a Spool printer, the file prints.

File Attributes You can change the file attributes which control when a file will print using the Print Spool screen (see Table 1-1). For example, the minimal attributes of the file 1INTRO.DOC, which was DOS-copied into the print spool:

can be changed to print the file on the appropriate printer.

Printer Attributes You also control the printer from the Print Spool screen. Printer attributes maintain the status of the printer and determine which files are selected for printing. There are three printer attributes that can be changed — State, Form, and Class.

The State attribute reflects the status of the printer. The printer State can be ready, printing, draining, disabled, or reprinting. Changing the printer State enables you to take down a printer for repairs and to reprint files that were stopped by a paper jam.

The Form attribute can be set to show the paper form that has been loaded on the printer. You might use special paper for printing checks, letters, invoices, etc. When you set the Form attribute, BARR/SPOOL prints only files with that Form.

The Class attribute can be used to send a specific group of files to a specific printer. Use of the Class attribute is completely user-defined. A Class can be any one-character, alphanumeric value. Up to 5 Classes can be entered for each printer. A file’s Class must match the printer’s Class, for the file to print on that printer.

When the File Prints

BARR/SPOOL performs any processing needed up until the moment that each line of the file is printed. It can send control strings to the printer, combine a form overlay with the text of the file, and save a backup copy of the file after it prints. You will learn more about the processing BARR/SPOOL performs as you proceed through the Installation Description.

Table 1-1. Methods for Setting File Attributes

*With the PRT utility, you cannot specify the disposition of the file after printing but you can specify the disposition of the file after copying to the spool directory.

Highlighting indicates file attributes that must match printer attributes before the file can print.

Table 1-2. Software for Which Methods are Available

1.2 Barr File Header

BARR/SPOOL stores information about how each file is to be printed in a record at the beginning of each file. This record is called the file header.

When a file is ready to be sent to the printer, the software processes the information in the file header. Information, such as lines-per-form, lines-per-inch, and printer control codes, is sent to the printer as commands. The file header record itself is not sent to the printer.

It usually is not necessary to have detailed knowledge of the file header format. Most users need only to work with file attributes and let the Barr software update the file header. However, if files do not print in the expected format you can view the information in the file header to help pinpoint the problem.

Some users may want to write application programs that generate the file header. However, the format of the header is subject to change without notice. This means that if you update your version of the software and the file header format has changed, you will have to modify your application programs. To obtain the current format of the file header, enable Write spool header to file? under Assign Devices and receive a test file using SPOOLn(FILE).

File Header Format

The file header consists of identifier text and data. Most values are preceded by an identifier and an equal sign. For example, FORMNAME= is an identifier, and CHECKS is the value. The file header ends with a form feed (FF) character. A sample file header is pictured below:

The following fields are included in the file header:

PRINTER

Text identifying this as the spool file header.

FORMNAME=CHECKS

The form name for the file, usually indicating the type of form paper to use in the printer. CHECKS and INVOICES are examples of form names.

LPF=066

The number of lines-per-form, indicating the vertical page size.

PLPF=042

The number of print lines-per-form, indicating the print area of each page.

LPI=6

The number lines-per-inch that will be printed on the page.

CONTROL=00

An optional printer control code index. This value is set using the PRT utility. It references an entry in the Barr Printer Control Data table for an LPT, COM, or NET device.

LOCNAME=

A field used internally by the Barr software for locating a form overlay file. If you are using a PC application program to generate the file header, leave this field blank.

JOBNAME=jobname

The job name for the file.

COPIES=1

The number of copies to print.

PRIORITY=5

The file print priority. Valid values are 0-9.

STATUS=READY

Indicates the state of the file. Valid states include Hold or Ready.

CLASS=1

The file class, represented by a digit or letter.

FCBNAME=fcbname

The name of the FCB (Forms Control Buffer). Usually this field is used only with files received from IBM mainframes.

UCS=

The name of the UCS print train. Usually this field is used only with files received from IBM mainframes.

0

The PDIR identifier byte. This number indicates whether the file contains a PDIR Job Separator. This field does not apply to BARR/SPOOL. Leave it blank.

D6C101

A six-character group code generated by the Barr software to group together separate Spool files that originated from the same host file. This field does not apply to BARR/SPOOL. Leave it blank.

CARRIAGE CONTROL STOPS

Carriage control character, or stops, are used to quickly advance the paper. Only one carriage control stop may be defined per line.