Spool file processing

Printers

When you configure BARR/SPOOL, it is essential to understand how data gets handled so you can correctly set up data formats. If your data format settings are incorrect, your documents might not have the format required for correct printing or processing. This topic describes data formats for documents stored in the Barr spool queue, and how the data is converted on the way into and out of the Barr spool queue. The examples contain tips for setting up Windows printers and BARR/SPOOL options to correctly route and print your data.

When you use BARR/SPOOL to route jobs, files are processed at several stages. Processing puts them in the required format for each stage. Your goal is to enter settings so that your documents are correctly formatted for their ultimate destination, also called destination-ready format. For example, if data is intended for a printer, it becomes destination-ready when it is converted to the format the intended printer requires. Data format is affected by settings for Windows printers (including port and driver settings), BARR/SPOOL printers, Barr product options, and Print Utility.

During its life cycle, a Barr spool queue document undergoes three significant format stages:

The document can be in destination-ready format before it arrives in the spool, converted to destination-ready format as it is received, or converted to destination-ready format as it exits the spool en route to its final destination.

The settings you select depend on the stage at which the document becomes destination-ready. As soon as the document becomes destination-ready, no further format processing is required. Thus, if a file is destination-ready in the spool, you must use a spool printer that has pass-through enabled to route the file.

See also:


Phase 1: Spool input format

Format of the file before it arrives in the Barr spool queue. Usually the file is formatted by the program that creates it. The method you use to put the file in the spool converts the file as it gets spooled. For example, Print Utility or a spool-inbound Windows printer converts the file to the internal spool format before adding the file to the spool.

The Phase 1 processing for a file depends on the file source, as shown in the following table.

File Source

Phase 1 Processing

Windows program

Windows printer (spool inbound)

Barr Print Utility

Print Utility configuration options

BARR/PRINT TCP/IP (LPD)

LPR/LPD protocol and BARR/PRINT TCP/IP Configuration utility options

BARR/PRINT TCP/IP (Socket)

BARR/PRINT TCP/IP Configuration utility options

NJE host

BARR/NJE configuration options

This table displays the formats that documents have when they are received by BARR/SPOOL from various sources.

Data Source

Data Format Applied (Spool-Resident)

Windows Printer with Barr EBCDIC printer driver

NJE-wrapped EBCDIC

Windows Printer with Barr Jobs to Mainframe printer driver

NJE-wrapped EBCDIC

BARR/NJE module

NJE-wrapped EBCDIC

BARR/PRINT390 module (requires Barr PRINT390 printer driver)

NJE-wrapped EBCDIC

BARR/PRINT TCP/IP module

Depends on selected file type*

Print Utility

Depends on selected file type*

*ASCII, BARR/RJE, or SYSIN as the file type: NJE-wrapped Equivalent to the NJE format at the mainframe. The data is typically EBCDIC and is formatted as NJE records, with NJE record headers and NJE file headers. EBCDIC; Metacode or Binary (NJE) file type: NJE-wrapped, untranslated data; Binary (raw) or BARR/SPOOL from archive: No wrapping, no translation

BARR/NJE input When you receive NJE data from a host with the BARR/NJE module, the BARR NJE service formats it as NJE-wrapped EBCDIC data. You can route this data to any BARR/SPOOL destination device.

BARR/RJE input When you receive RJE data from a host with the BARR/RJE module, the BARR RJE service converts the SCS carriage control to ASA carriage control and formats it as NJE-wrapped EBCDIC data. You can route this data to any BARR/SPOOL destination device.

Print Utility input When you send jobs to the spool with Print Utility, the utility converts the file based on the file type you choose.

Selected File Type

Resulting File Format

Standard ASCII

NJE-wrapped EBCDIC

ASCII with ASA carriage control

NJE-wrapped EBCDIC

Barr DOS (ASCII or S/370)

NJE-wrapped EBCDIC

SYSIN data (JCL)

NJE-wrapped EBCDIC, 80 character records, without carriage control

VBM and Xerox formats

NJE-wrapped records, but no data translation

Binary (raw)

No wrapping, no data translation

Binary (raw) Wrap in NJE format

NJE-wrapped records, but no data translation

AFP

AFP formatted data

Barr archive

No wrapping, no data translation

BARR/PRINT TCP/IP input When you receive files with BARR/PRINT TCP/IP (LPD), data formatting depends on the associated control file. You can configure Barr LPD to convert the data to a specific file-type based on the control files file type switch. The control file switches are set by the LPR device that sends the file to BARR/SPOOL. You specify the configuration settings on the BARR/PRINT TCP/IP Configuration Utility's File Properties dialog box.

For LPD to handle word processor data, set LPR to verbatim (-Ov) and LPD to Binary (raw).

The following table displays information for BARR/PRINT TCP/IP LPD and socket.

Selected File Type

Resulting File Format

ASCII text

NJE-wrapped EBCDIC

ASCII with ASA carriage control

NJE-wrapped EBCDIC

Barr DOS (ASCII or S/370)

NJE-wrapped EBCDIC

SYSIN data (JCL)

NJE-wrapped EBCDIC, 80 character records, without carriage control

VBM and Xerox formats

NJE wrapped records, but no data translation

Binary (raw)

No wrapping, no data translation

Binary (raw) Wrap in NJE format

NJE wrapped records, but no data translation

Barr archive

No wrapping, no data translation

SYSIN data (JCL) is supported as a valid input data type. However, if the data contains an embedded command (a ## statement), the files referenced must be accessible on the receiving Barr computer.

Barr Spool port input When you receive data to the Barr spool queue using a Windows printer defined with the Barr Spool port, the data conversion depends on which printer driver you select for the Windows printer:

Phase 2: Spool resident format

Its easier to understand inbound and outbound Barr spool queue data formats if you understand the valid formats that data can have when it resides in the Barr spool queue. Documents that reside in the Barr spool queue can have one of these two formats:

The Windows and Barr software settings you select determine which format the data have when they arrive in the spool. Keep these points in mind when you direct data into the Barr spool queue:

Phase 3: Spool output format

When the spool routes the file from the spool folder to another device, it processes files according to the spool configuration options you selected. For example, it might attach job separator headers or trailers. The spool also converts the file to a format that the destination devices driver requires, unless the file already is in destination-ready format and you enabled the Pass-through spool printer option. Destination devices, such as printers, require files to be in formats they support. If a file is not in destination-ready format, as it leaves the spool the corresponding device driver converts the file to the format the destination device supports.

Phase 3 processing depends on these factors.

This table displays the formats that documents have when they are outbound from BARR/SPOOL to their destination.

Destination

Data Format Applied (Spool Outbound)

S/390 channel printer

S/390 channel output

LPR device

Depends on selected file type

NJE host

NJE-wrapped EBCDIC (EBCDIC driver required)

Standard printer

Depends on selected driver

File port

Depends on selected file type

BARR/PRINT390 output BARR/PRINT390 supports only NJE-wrapped EBCDIC data that has machine carriage control or no carriage control characters.

Barr LPR output When you route outbound files with the Barr LPR feature, Barr LPR does not perform data conversion. Instead, you set switches on the Barr LPR port or LPR command line that instruct the LPD destination device how to convert the data.

See the standard printer output section later in this topic.

BARR/NJE and BARR/RJE output When you route data to a host, your settings depend on whether the data is SYSIN or SYSOUT.

SYSIN data

SYSOUT data

Standard printer output The printer driver for the outbound spool printer will process data in the NJE-wrapped EBCDIC format. The printer driver converts the data to the format that the printer requires, adding control codes One or more nonprinting characters used by a computer program to control the actions of a device, used in printing, communications, and management of display screens. and formatting commands based on settings such as those from the FCB and form. For the outbound spool printer, select the Barr ASCII printer driver or any other non-Barr printer driver. Be sure that the pass-through setting is disabled. For instance, if the output spool printer uses the HP LaserJet printer driver, PCL Acronym for Printer Control Language. Hewlett-Packard uses this language in its LaserJet, DeskJet, and RuggedWriter printer lines. commands will be added as necessary.

Barr File port output When you route data to a file destination using a Windows printer defined with the Barr File port, you can select the output format. The output format settings are included in the File port configuration and are applied as the local spool printer routes the file to its destination. Choose the output format on the File Format tab when you configure the Barr File port.

Data format examples

The following are data formats for documents stored in the Barr spool. Data is received from hosts and printed to various destinations.

Data from NJE host to BARR/PRINT390

NJE automatically receives data as NJE-Wrapped EBCDIC, the format required to successfully print to BARR/PRINT390.

  1. Select the Barr PRINT390 printer driver when you define the Windows printer for the outbound spool data.

  2. Make sure the Windows printers setting Print Directly to the Printer is enabled.

Microsoft Word to HP printer through Spool

Because Microsoft Word is typically set to format the document for printing, meaning the data is in destination-ready format, you need to use pass-through mode.

  1. Set pass-through mode when you define the Barr spool printer in the Configuration Utility.

  2. Use the Barr Spool port to receive jobs into the spool and the appropriate printer driver, in this case an HP driver, when you print from the spool.

When data leaves the spool, it is sent unprocessed (that is, no wrapping, no translation). Pass-through mode prevents any output processing from occurring. The data will be sent to the printer in the exact format it was in when it left Microsoft Word.

Loopback to return data to Spool

You can loop data back into the spool for testing purposes. During loopback A testing procedure in which transmitted data is returned as received data. testing, always set the Barr spool printer to pass-through mode. Each pass through printer driver processing will add data (such as control codes, format bytes, and FCBs) to the stream. This will cause the data to grow at a regular pace as they are looped. If you are verifying that a device can move data for a specified length of time, then pass-through mode is mandatory. Otherwise, problems such as Disk Full errors can occur.

The only exception to this is when you loop data between BARR/SPOOL and the NJE host. NJE host loops use SYSOUT data. For data to be valid at the host, translation must be performed and pass-through mode would prevent the required translation. Fortunately, NJE at the mainframe is structured enough that it delivers back to the sending node exactly what it receives, which means that data will not increase in size as the loop proceeds.

LPR/LPD to BARR/PRINT390

Typically, BARR/SPOOL receives data from an LPR printer as ASCII text. This allows the LPD service to be set to wrap and convert the data to NJE-wrapped EBCDIC, the only allowable format for sending to BARR/PRINT390.

  1. Find out which file type switch is being set for the data (usually -f for plain text).

  2. In the BARR/PRINT TCP/IP Configuration utility, enter that switch in LPD queue settings and select Standard ASCII as the file type. This tells LPD to accept ASCII text for processing.

SYSIN data to an NJE or RJE host

JCLs sent to an NJE host are handled as SYSIN data, and are sent as a number of 80-character records. The data must be formatted as SYSIN before it arrives in the Barr spool queue.

Refer to the Sending files (JCL SYSIN) to the RJE host or Sending files (JCL SYSIN) to the NJE host topic for more information.

SYSOUT data to an NJE host

NJE can move print data between hosts for printing on any printer in the NJE network. You can send any spool-resident print data that is in NJE-wrapped EBCDIC format to a host on the NJE network for printing.

If you specify the destination node in the NDHBNODE and NDHGNODE fields, the NJE node that BARR/SPOOL is connected to will check the value of these fields and route the job appropriately.