FILEFORMAT

Specifies the format of the input file. If you do not specify the FILEFORMAT parameter, ACIF uses STREAM as the default.

The FILEFORMAT parameter does not apply to resources. Resource files are in MO:DCA-P or AFP data stream format, and ACIF automatically determines that the file is a resource.

FILEFORMAT={RECORD | RECORD,n | STREAM[,(NEWLINE={CR | LF | CRLF | X'nnnn'}[,encoding])]}

The values are:

RECORD
The input file is formatted in S/390 or System z record format, where the first 2 bytes of each line, called the record descriptor word (RDW), specify the length of the line. Files with RECORD format typically are z/OS or VM files with a variable record format. These files are either NFS-mounted to AIX or Windows or sent by using Download for z/OS.
RECORD,n
The input file is formatted in such a way that each record (including AFP data stream and MO:DCA-P records) is a fixed length, n bytes long. The value of n is a number 1 - 32760, and specifies the fixed length of the record, including all control characters. The encapsulated size of the AFP structured field must be less than the size of n. Files with RECORD,n format typically come with fixed-length file attributes from a S/390 or System z host system, such as z/OS or VM.
STREAM
The input file has no length information; it is a stream of data that is separated by a newline character. The AFP portion of the input file has its length information encapsulated in the structured field. Files with STREAM format typically come from a workstation operating system, such as AIX, Windows, or DOS.

ACIF examines the first 6 bytes of the first line data record of the input file to determine whether the input file is ASCII or EBCDIC. If ACIF determines that the input file is ASCII, ACIF looks for the ASCII newline character (X'0A') to delimit the end of a record. If ACIF determines that the input file is EBCDIC, ACIF looks for the EBCDIC newline character (X'25') to delimit the end of a record. If the input record is MO:DCA-P, no newline character is required. ACIF does not include newline characters in the MO:DCA-P data stream that it produces.

Note: The default newline characters might be incorrect; therefore, to ensure correct formatting results, specify NEWLINE with the STREAM parameter.
NEWLINE={CR | LF | CRLF | X'nnnn'}[,encoding])
NEWLINE is an optional value of FILEFORMAT that is used only if STREAM is specified. You use NEWLINE to specify the characters and optional encoding for determining line breaks in the input data file. The newline character values are:
CR
Carriage returns determine line breaks.
LF
Line feeds determine line breaks.
CRLF
Carriage returns followed by line feeds determine line breaks.
X'nnnn'
One-, 2-, or 4-byte hexadecimal characters determine line breaks.
encoding
One of these values, ASCII, EBCDIC, UTF8, or UTF16, indicates which hexadecimal strings ACIF uses to determine line breaks when CR, LF, or CRLF are specified (see Hexadecimal strings for encoding values). If the encoding value is UTF8 or UTF16 and the UDTYPE parameter is specified as UTF16 with the PPFA PAGEDEF command, ACIF checks for a Byte Order Mark (BOM) character and, if present, reverses the bytes in the delimiter characters for UTF-16 little endian data.
Note: Specify the value of the data before it is converted with a user exit. For example, if you are calling the apka2e user exit to convert ASCII data to EBCDIC, specify the encoding value as ASCII.

Hexadecimal strings for encoding values

Encoding Value CR LF CRLF
ASCII X'0D' X'0A' X'0D0A'
EBCDIC X'0D' X'25' X'0D25'
UTF8 X'0D' X'0A' X'0D0A'
UTF16 (big endian data) X'000D' X'000A' X'000D 000A'
UTF16 (little endian data) X'0D00' X'0A00' X'0D00 0A00'

You can use NEWLINE when ACIF’s algorithm cannot determine the correct newline character (if blanks are at the beginning of the file, for instance), or you can use NEWLINE if you want to specify a newline character that is not the standard default. If NEWLINE is not specified, ACIF uses the algorithm that is specified under FILEFORMAT=STREAM. However, specifying NEWLINE is always preferable to having ACIF determine the correct default.

These examples show how to use NEWLINE:

FILEFORMAT=STREAM,(NEWLINE=X'0D0A')
FILEFORMAT=STREAM,(NEWLINE=X'000D000A')
FILEFORMAT=STREAM,(NEWLINE=CRLF,UTF16)