IBM S544-5285-01 Printer User Manual


 
Working with file transfer and AIX
(If you work outside the AIX environment, you may skip this section, as the
information about working with file transfer does not pertain to the OS/390 or MVS,
VM, or VSE environments.)
ACIF needs to know two things about a file in order to print it:
How long is each print record
What kind of carriage control is used
As simple as this sounds, it is the source of most of the difficulty people have
printing with ACIF in an AIX environment.
ACIF processes print records. A record is a sequence of contiguous characters,
usually representing a printed line or a MO:DCA (AFPDS) structured field
2
. Each
record has a defined boundary or length. Some files contain information in each
record that describes the record's length; these are called variable-length files.
Other files require an external definition of length; these are called fixed-length files.
Variable-length files
Variable-length files may use a length prefix, which means they contain a
prefix that identifies the length of the record in the file. Each record
contains a field that gives the length of the record. If the record contains a
length, that length must be a prefix for each record and it must be a 16-bit
binary number that includes the length of the 2-byte length prefix. Use the
FILEFORMAT=RECORD control statement to identify files with length
prefixes.
Variable-length files may use a separator or delimiter to indicate the end of
a record, instead of using a length prefix. All of the bytes up to, but not
including, the delimiter are considered to be part of the record. For AIX, the
delimiter is X'0A'. If the file uses EBCDIC encoding, the newline character
is X'25'. Use the FILEFORMAT=STREAM control statement to designate
files that use newlines to indicate record boundaries.
ACIF reads the first six bytes and tests for all ASCII characters
3
, to
determine if a file is encoded in ASCII or EBCDIC. If no non-ASCII
characters are found, ACIF assumes the file uses the ASCII newline
character, X'0A'. Otherwise, ACIF assumes the file uses the EBCDIC
newline character, X'25'. Because an input file can misguide ACIF, either
intentionally or by accident, a set of rules has been established to
determine how ACIF will interpret how a file will be processed. The
following combinations are possible:
Data Type Newline Character
All EBCDIC EBCDIC X'25'
All EBCDIC ASCII X'0A' (Note 1)
All ASCII EBCDIC X'25' (Note 1)
All ASCII ASCII X'0A'
2
Structured fields are similar to print commands.
3
code points from X'00' to X'7F'
180 ACIF User’s Guide