You use the syntax rule field_pos to describe:
· The position of the input field in the data stream when loading application data
· The position of an output field in the data stream when unloading application data
· The position of a comparison value for loading application data selectively (Selecting Data Records).
<field_pos> ::= <valSTART_POS> | <valSTART_POS> - <valEND_POS>
valSTART_POS |
Start position of a data field |
valEND_POS |
End position of a data field |
The position description is dependent on the format of the data stream.
If the data stream has the FORMATTED format, enter only absolute start and end positions for the data fields in the data stream.
The data stream 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 .... |
|
- 3 0 0 0 M r s - - - - J e n n y - - - - - P o r t e r |
FASTLOAD Command
FASTLOAD TABLE
customer
cno 01-05
title 06-12
firstname 13-22
name 23-32
zip 33-37
address 38-62
INSTREAM 'customer.data' FORMATTED
If the data stream has the COMPRESSED format, enter only relative positions for the data fields in the data stream.
The data stream customer.data has the COMPRESSED format. The data fields do not have a uniform format but are separated by commas and end with a line break.
Position Number |
1 2 3 4 .... |
|
"3000","Mrs","Jenny","Porter",... |
FASTLOAD Command
FASTLOAD TABLE customer
cno 1
title 2
firstname 3
name 4
zip 5
address 6
INSTREAM 'customer.data'
DELIMITER "
COMPRESSED is the default used by the Loader.
The data stream customer.data has the FORMATTED BINARY format:
The data fields have a standard format but do not end with a line break.
FASTLOAD Command
FASTLOAD TABLE customer
cno 01-05
title 06-12
firstname 13-22
name 23-32
zip 33-37
address 38-62
INSTREAM 'customer.data' FORMATTED BINARY