Delimited flat files

A delimited flat file contains one or more records set off from each other by a specified delimiter, or separator. For example, each record may be terminated by the operating system's line separator and each field within a record may be separated by a comma.

Delimiters are not read in as part of the data. However, if the delimiter character does appear as data, the data can be formatted so the data and the delimiter are distinguishable. For example, the field in which a delimiter character displays can be enclosed in quotation marks to indicate that the delimiter character is to be treated as data and not as a delimiter. For example, if you choose to use an asterisk (*) as the delimiter and it also displays in a data field following the word Special, then it should exist in the flat file as "Special*". In other words, the complete data field should be within quotation marks (" ").

For example, if a delimited flat file on a UNIX system has fields that are delimited by commas, it would appear as shown below.

Figure 1. Fragment of a delimited flat file
          NAME, COLOR
          Sam, turquoise \n
          David, red \n
          Elizabeth, orange \n