Non-delimited ASCII (ASC) file format
The non-delimited ASCII format, known as ASC to the import and load utilities, comes in two varieties: fixed length and flexible length. For fixed length ASC, all records are of a fixed length. For flexible length ASC, records are delimited by a row delimiter (always a new line). The term non-delimited in non-delimited ASCII means that column values are not separated by delimiters.
When importing or loading ASC data, specifying the reclen
file
type modifier will indicate that the datafile is fixed length ASC.
Not specifying it means that the datafile is flexible length ASC.
The non-delimited ASCII format, can be used for data exchange with any ASCII product that has a columnar format for data, including word processors. Each ASC file is a stream of ASCII characters consisting of data values ordered by row and column. Rows in the data stream are separated by row delimiters. Each column within a row is defined by a beginning-ending location pair (specified by IMPORT parameters). Each pair represents locations within a row specified as byte positions. The first position within a row is byte position 1. The first element of each location pair is the byte on which the column begins, and the second element of each location pair is the byte on which the column ends. The columns might overlap. Every row in an ASC file has the same column definition.
ASC file ::= Row 1 data || Row delimiter ||
Row 2 data || Row delimiter ||
.
.
.
Row n data
Row i data ::= ASCII characters || Row delimiter
Row Delimiter ::= ASCII line feed sequencea
- a The record delimiter is assumed to be a new line
character, ASCII x0A. Data generated on the Windows operating system can use the carriage
return/line feed 2-byte standard of 0x0D0A. Data in EBCDIC code pages
should use the EBCDIC LF character (0x25) as the record delimiter
(EBCDIC data can be loaded using the
codepage
file type modifier with the LOAD command). The record delimiter is never interpreted to be part of a field of data.