Entering content frame

 FORMATTED BINARY 

FORMATTED BINARY (FWV, Fixed Width, Columnar Values) is a possible format of a data stream. As this format is not the default value of the Loader, it must be explicitly specified in an unload or load command.

This format can be used to unload and load 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.

customer.data

Position no.

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

 

0 1 m i l l e r x 1 0 2 7 7 N e w  Y o r k       0 2 s m i t h    6 0 6 7 8 C h i c a g o         0 3 k l e i n e r t 3 3 1 8 4 M i a m i 

The data fields have a uniform format.

FASTLOAD command:

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

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 stream and table columns is made in accordance with the <field_pos> position specification in the unload or load command.

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

Position Specifications

Data fields are described by their byte start and end positions. 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 stream 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 unload or load data. When it unloads data, the Loader fills any gaps with blank characters.

 

Leaving content frame