FORMATTED BINARY 

FORMATTED BINARY specifies a format for a data file. Since this format is not the Replication Manager default, you must specify it explicitly in a command for loading or unloading data.

This format can be used to load and unload binary values.

The FORMATTED BINARY format is largely the same as the FORMATTED format. The only difference is that the length of a data record is only determined by the total length of the individual data fields.

Data Fields

The data fields can contain special characters and all have the same fixed length. This also applies to the individual data records.

The assignment between data fields in the data file and the table columns is made according to the <field_pos> position in the command for loading or unloading data.

Unlike the FORMATTED format, a data record does not end with an additional line break.

Specified Positions

Data fields are described by their byte start and end position. The first possible byte start position of a data record is 1. Specifying an end position is optional. If you do not specify an end position, the corresponding data field has a length of 1.

The data fields of the data file can be assigned in any order to the table columns. The order does not affect the processing speed.

The positions do not need to follow each other directly when you load or unload data. When it unloads data, the Replication Manager fills any gaps with blank characters.

customer.data

Position no.

1 2 3 4 5 6 7 8 9 .....

 

0 1 m u e l l e r x 6 9 1 8 5 W a l l d o r f       0 2 s c h m i d t   1 3 4 0 3 B e r l i n           0 3 k l e i n e r t 2 5 0 0 0 U p p e r - L o w e r 

The data fields have a standard format.

FASTLOAD command:

FASTLOAD TABLE customer
  cno       01-02
  surname   03-10
  zip       11-15
  place     16-26
INFILE 'customer.data'
FORMATTED BINARY