All LONG values to be unloaded from a column are written in one data stream.
In the command for unloading data you enter the name of a data stream for each LONG column, into which the each of the LONG values of this LONG column to be unloaded are entered.
If the LONG column you want to unload has no value in a data record (the value is an empty character string), the position specification for this LONG value is generated as follows: the start position is the end position of the preceding LONG value in the column plus 1; the end position is the end position of the preceding LONG value in the column. This means that the start position is always one value larger than the end position.
The start and end position of the generated LONG value in the data stream enable the LONG values to be assigned to data records.
DATAEXTRACT * FROM
hotel
OUTFIELDS
hno 1
name 2
info 3
OUTFILE 'hotel.data'
LONGFILE info 'info.data'
Content of the target data stream:
10,Excelsior,1-880
30,Flora,881-1046
60,Bellevue,1047-1360
See also:
Each LONG Value to Be Unloaded in a Separate LONG Data Stream