Working with file transfer and AIX

(If you work outside the AIX environment, you may skip this section, information about working with file transfer does not pertain to the OS/ 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 printing with ACIF in an AIX environment.

ACIF processes print records. A record is a sequence of contiguous c usually representing a printed line or a MO:DCA (AFPDS) 2.struEacturedh field record has a defined boundary or length. Some files contain information record that describes the record's length; these are called variable Other files require an external definition of length; these are called

ŸVariable-length files

 

Variable-length files may use

a length prefix, which means they

 

prefix

that identifies

 

the

 

length of the

record in

the

file.

 

contains

a

field that

gives

 

the length of the record. If the

 

length,

that length must be a

prefix for each record and it mu

 

binary

number that includes the length of

the 2-byte length pref

 

FILEFORMAT

 

=RECORD control statement to identify files with length

 

prefixes.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Variable-length

files

may

use

a

separator

or

delimiter

to

indicat

 

a record, instead of using a length prefix. All of the bytes

 

including, the delimiter are considered to be part of the reco

 

delimiter 'is0A '.X

If

the

file

uses EBCDIC encoding, the newline ch

 

is 'X25 '.

Use FILEFORMATthe

 

=STREAM

 

control

statement

to

designate

 

 

files that

use

newlines

 

to

indicate

record

boundaries.

 

 

 

 

 

 

 

 

 

 

 

 

 

3

 

 

 

 

ACIF reads the first six bytes and tests for,toall ASCII charact

 

determine if a file is encoded in ASCII or EBCDIC. If no non-ASC

 

characters are found, ACIF assumes the file uses the ASCII newl

 

character,'0A 'X.

Otherwise,

ACIF

assumes the file uses the EBCDIC

 

newline

character,'25 '.X Because

an

input

file

can misguide

ACIF, eith

 

intentionally or by accident, a set of rules has been establishe

 

determine how ACIF will interpret how a file

will

be processed.

 

following

combinations

are

possible:

 

 

 

 

 

 

Data

Type

 

 

Newline

Character

 

 

 

 

 

 

 

 

 

All

EBCDIC

 

 

EBCDIC X '25 '

 

 

 

 

 

 

 

All

EBCDIC

 

 

ASCII 'X0A ' (Note 1)

 

 

 

 

 

All

ASCII

 

 

 

EBCDIC 'X25 ' (Note 1)

 

 

 

 

 

All

ASCII

 

 

 

ASCII'0AX'

 

 

 

 

 

 

 

 

 

2

Structured fields are similar to print commands.

3

code points from'00 ' Xto'7FX'

180 ACIF User’s Guide

Page 200
Image 200
IBM S544-5285-01 manual Working with file transfer and AIX, Variable-length files, Ebcdic, Ascii Ascii 0AX