PRINT370 manual

Appendix C. Xerox File Formats

If you are printing to a Xerox laser printer, you can use the information in this appendix to help resolve printing problems. This appendix describes how PRINT370 handles files with these three Xerox file formats: LPS, Interpress, and Metacode.

Files with these formats usually are created on a PC and sent to Xerox laser printers from the PRINT370 software. Printer resource files from the mainframe also can be in these formats at the host. However, print files from the mainframe are received with S/370 Channel receive mode and thus are in the Barr S/370 file format.

When PRINT370 sends these files to the printer, it performs special processing, depending on the file type. Files in LPS or Interpress format are considered binary files. PRINT370 sends DJDE strings to the printer at the beginning of the file and then sends the file in 128-byte blocks. You specify the format of the DJDE strings for Xerox laser printers on the Advanced Printer Options screen. (The DJDE options display only when you select Xerox Laser as the printer type.) When the software sends files with the Metacode format to the printer, it does not translate channel commands or data.

PRINT370 uses the file format to determine the file type, so be careful not to accidentally generate ASCII files that contain these characteristics. The software looks for certain characters at specific byte positions in the file. All byte offsets begin with offset zero, the first byte of the file.


C.1 LPS Files

LPS files are used as form overlays, fonts, or logos. Normally, these resource files are created on the PC and then stored on the Xerox printer’s hard disk. When a file is sent to the printer, DJDEs in the print data tell the printer which resources to use.

You can use PRINT370 to move these resource files to the printer. Usually you only need to send the files to the printer when you create or modify them.

LPS File Format

LPS files are distinguished by a 128-byte file format header that contains the file name and file type. The number of bytes in the file is typically an integer multiple of 128. See Table C-1 for a description of the file header.

Table C-1. LPS Format Header

Offset

Field

Comments

0

File name (RAD 50 format)

Zero if not used.

4

File type (RAD 50 format)

Zero if not used. Font = C4 27, Form = 5D 28, Logo = 27 4C

6

File size

File size in 512 byte blocks

8

First free byte

 

10

Date (DOS format)

Not used.

12

Record size in bytes

 

16

Reserved

 

18

ASCII file name

Only six of the nine bytes are used. The unused bytes must be zero.

27

ASCII file type

Font = FNT, Form = FRM, Logo = LGO

30

Reserved

 

34

00

 

126

00

 

127

2A

ASCII asterisk (*)

LPS File Processing

PRINT370 tests for the two byte values 00 2A starting at offset 126. That is, it checks byte 127 for a value of 00 and byte 128 for a value of 2A or an asterisk (*).

When PRINT370 sends an LPS file to the printer, it first sends this DJDE string:

$DJDE$ FILE=(), END;

The printer gets the file name and type from the first record of the LPS file. PRINT370 sends the remainder of the file as 128-byte records. At the end of each record, the software adds an asterisk (byte 129) and sends a Write and Space command. If the last record does not contain 128 bytes, PRINT370 pads the record with 00 bytes up to byte 128, and then adds the asterisk.

C.2 Interpress Files

You can produce graphics files on the PC in the Interpress format and then use PRINT370 to send these files to the printer.

Interpress File Format

The Interpress file is a binary file with a header record that contains the words:

INTERPRESS XEROX IMG

The number of character spaces between these words can vary. The number of bytes in the file is typically an integer multiple of 128.

Interpress File Processing

Interpress file processing is similar to LPS file processing. To determine whether a file is in Interpress format, PRINT370 searches for the words INTERPRESS, XEROX, and IMG in the first 128 bytes of the file. The words can be uppercase or lowercase.

When PRINT370 sends this type of file to the printer, it first sends two DJDE strings.

$DJDE$ BEGIN=, END;
$DJDE$ GRAPHIC, END;

PRINT370 sends the remainder of the file as 128-byte records. At the end of each record, the software adds an asterisk (byte 129) and sends a Write and Space command. If the last record does not contain 128 bytes, PRINT370 pads the record with 00 bytes up to byte 128, and then adds the asterisk.

C.3 Metacode Files

Metacode files are print files generated on the PC. Because the print data contains special Metacode formatting that would conflict with ASCII control characters, PRINT370 must distinguish Metacode files from ASCII files.

Metacode File Format

Metacode is a block variable format similar to the mainframe format RECFM=VBM. The blocks and records must adhere to a specific structure.

Block Structure – A data block can contain one or more records. The block begins with a two-byte count of the bytes in the block, with the most significant byte (MSB) value listed first followed by the least significant byte (LSB). Two null bytes follow the count bytes. The block size includes the block length bytes, null bytes, and sum of all the record lengths.

Block length byte (MSB)

Block length byte (LSB)

00

00

Records

Record Structure – Each record begins with a two-byte count of the bytes in the record and two null bytes. The record size includes five bytes of format information (the length bytes, null bytes, and carriage control byte) and all the data bytes. Carriage control bytes must be expressed as machine carriage control.

Record length byte (MSB)

Record length byte (LSB)

00

00

Machine carriage control byte

Date bytes

Metacode File Processing

To determine whether a file is in Metacode format, PRINT370 tests for a pair of null bytes (00 00) starting at offsets two and six. In other words, PRINT370 looks for this sequence at the beginning of the file:

xx xx 00 00 xx xx 00 00

PRINT370 does not check the values of the bytes represented by xx.

The software assumes that the first byte in each record is the channel command. Carriage control commands must be machine carriage control, because the channel and the Xerox online printer interface do not support any other carriage control type. The software performs no other special processing. The software sends the carriage control and data to the printer without validating or translating it.