You can use a formatted pathname to designate a filename. If you use a formatted pathname, you can take advantage of the substitution characters %c, %n, and %r (first ... last).
These options specify additional characteristics that define the table.
Table Options: .-,-------------------------------------. V .-DELIMITED-. | |----+-FORMAT--'-+-+-----------+-+-'-----+-+--------------------| | +-INFORMIX------+ | | '-FIXED---------' | +-+-DEFAULT-+-----------------------+ | +-ESCAPE--+ | | +-EXPRESS-+ | | '-DELUXE--' | | .-ASCII-. | '-+-CODESET--'-+-+-------+-+-'----+-' | '-EBCDIC----' | +-DELIMITER--'field_delimiter'--+ +-RECORDEND--'record_delimiter'-+ +-MAXERRORS--num_errors---------+ +-REJECTFILE--'filename'--------+ '-SIZE--num_rows----------------'
Element | Description | Restrictions | Syntax |
---|---|---|---|
field_delimiter | Character to separate fields. Default is pipe ( | ) character | For nonprinting characters, use octal | Quoted String |
filename | Full pathname for conversion error messages from coservers | See Reject Files. | Must conform to operating-system rules. |
num_errors | Errors per coserver before load operations are terminated | Value is ignored unless MAXERRORS is set | Literal Number |
num_rows | Approximate number of rows contained in the external table | Cannot be a negative number | Literal Number |
quoted_string | ASCII character specified here as the escape character | Only a single character is valid | Quoted String |
record_delimiter | Character to separate records Default is Newline ( \n ) | For nonprinting characters, use octal | Quoted String |
The num_errors specification is ignored during unload tasks. If the MAXERRORS environment variable is not set, the database server processes all data in load operations, regardless of the number of errors or num_errors value.
If the RECORDEND environment variable is not set, record_delimiter defaults to the Newline character ( \n ). To specify a nonprinting character as the record delimiter or field delimiter, you must encode it as the octal representation of the ASCII character. For example, \006 can represent CTRL-F.
Use the table options keywords as the following table describes. You can use each keyword whenever you plan to load or unload data unless only one of the two modes is specified.
Deluxe mode is required for loading into STANDARD tables.
Rows that have conversion errors during a load or rows that violate check constraints on the external table are written to a reject file on the coserver that performs the conversion. Each coserver manages its own reject file. The REJECTFILE clause declares the name of the reject file on each coserver.
You can use the formatting characters %c and %n (but not %r) in the filename format. Use the %c formatting characters to make the filenames unique. For more information on how to format characters, see the section Using Formatting Characters.
If you perform another load to the same table during the same session, any earlier reject file of the same name is overwritten.
Reject file entries have the following format:
coserver-number, filename, record, reason-code, field-name: bad-line
The following table describes these elements of the reject file:
The reject file writes the coserver-number, filename, record, field-name, and reason-code in ASCII. The bad-line information varies with the type of input file.
Errors that can cause a row to be rejected include the following.