field_pos 

Syntax

<field_pos> ::= <valSTART_POS> | <valSTART_POS> - <valEND_POS>

valSTART_POS

Start position of a data field

valEND_POS

End position of a data field

Use

This is a syntax rule for describing tables.

Use it to describe the following:

The position depends on the format of the data that you want to load or unload.

Format FORMATTED

If the data file has the format FORMATTED, only enter absolute start and end positions for the data fields in the data file.

The data file customer.data has the FORMATTED format. The data fields have a standard format and end with a line break.

Position no.

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

 

0 1 m o o r e - 1 0 0 4 4 N e w   Y o r k - - - - -
0 2 s c h m i d t - 1 3 4 0 3 B e r l i n - - - - -
0 3 s o r o k i n - 9 0 1 8 5 L o s   A n g e l e s

FASTLOAD command:

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

Format COMPRESSED

If the data file has the format COMPRESSED, only enter relative positions for the data fields in the data file.

The data file customer.data has the COMPRESSED format. The data fields do not have a standard format but are separated by commas:

Position no.

1   2       3    4       ....

 

001,moore,10044,New York
002,schmidt,13403,Berlin
003,sorokin,90185,Los Angeles

FASTLOAD command:

FASTLOAD TABLE customer
  cno       1
  surname   2
  zip       3
  place     4
INFILE 'customer.data’

COMPRESSED is the default format used by the Replication Manager.

The data file customer.data has the FORMATTED BINARY format.

Position no.

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

 

0 1 m o o r e x 1 0 0 4 4 N e w   Y o r k : : : 0 2 s c h m i d t : 1 3 4 0 3 B e r l i n : : : : : 0 3 s o r o k i n 9 0 1 8 5 L o s   A n g e l e s 

The data fields have a standard format but do not end with a line break.

FASTLOAD command:

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