The Barr output statement is a feature used to provide information typically used for printing a file, such as job name, form name, file name, copies, priority, and class. You insert the information in the file before it is received to the computer. BHCS extracts the data from the file and either stores it in the spool header or deletes it, depending on the option selected. The output statement is useful when other methods for obtaining print instructions are not available.
Keywords are used to set options in the output statement. These keywords represent predefined header fields. The following table lists the accepted keywords and their associated header field.
Keyword |
Header Field |
FILENAME |
|
JOBNAME |
|
FORMNAME |
|
FCBNAME |
|
COPIES |
|
PRIORITY |
|
CLASS |
|
DISP |
When you use keywords to set options in the output statement, substitute the option value for n:
FILENAME=n JOBNAME=n FORMNAME=n FCBNAME=n COPIES=n PRIORITY=n CLASS=n DISP=n
Use the DISP= field to specify the disposition the file will have after it prints. To retain the file, specify DISP=R. To delete the file, specify DISP=D.
Keywords are used to set options in the output statement. Specify only the options that you need. You can list the options in any order. Output statements used with LPD print queues, TCP/IP sockets, and RJE connections must be in all uppercase or all lowercase. Mixed case is not supported. All three case types are supported, however, when using Print Utility to send a file to the spool.
OUTPUT FORMNAME=taxes FILENAME=taxdata
If you specify an invalid parameter, the following error message displays on the Operator Console: WARNING: Unrecognized part of OUTPUT Statement skipped -- <invalid parameter>.
The placement of the output statement varies depending on the type of data being sent.
In the output statement, the word output must begin in column 1, column 7 must be blank, and the keyword for the first option must begin in column 8. The statement must fit on one line in the file and cannot wrap to the next line. If the file’s maximum line length is limited to 80 characters, you might not be able to specify all of the possible options.
The output statement must be located inside a valid record. For S/370, the output statement is converted to ASCII from its original format (specified in the input code page) before processing.
The output statement must be the first item in the file, and it must be terminated by a CR LF (0x0D 0x0A). Because the output statement is at the beginning of the file, the Keep data prior option does not apply. The following is a valid output statement: OUTPUT FORMNAME=taxes FILENAME=taxdata<CR LF><start of binary data...>
We do not recommend using the Output statement and Headers from data options together.
If you use the Output statement option in conjunction with the Headers from data option on the Options tab or Device Properties dialog box you must be careful selecting your settings. The Output statement option is always processed before the Headers from data option.
If you select Keep data prior, do not count the output statement when you are counting the number of records. The output statement will be removed before the header data is extracted. If you count the output statement, the header data will be extracted from the record after the one you intended.
If you do not select Keep data prior, the data before the output statement is removed. The header data, therefore, can only be extracted from a record after the output statement. When counting records to determine which record to use for the header data, begin with the record immediately after the output statement.