(Contents)(Previous)(Next)

Data Formats in the Target File

On request, LOAD converts the output values into the specified data format (see chapter External Data Formats).

Example:

DATAEXTRACT * FROM item;

itno 01-08 CHAR

descr 09-39

stock 40-43 INTEGER

min_stock 44-45 INTEGER

price 47-53 DECIMAL(2)

weight 54-57 REAL

OUTFILE ...

The external data format need only be specified in an extract statement if the relevant column is to be output in another format than CHAR. Output in CHAR format is possible for all column types.

LOAD can convert columns of the type FIXED, SMALLINGT, and INTEGER into any of the numerical data formats INTEGER, DECIMAL, ZONED, and REAL; if, in doing so, any significant digits could be lost, a syntax error is reported. Refer to the annotations for the external data format INTEGER in chapter External Data Formats.

FLOAT-type columns can only be converted into REAL (or CHAR) ones.

In order to edit the output file in every environment, each of the mentioned data formats can also be supplied in hexadecimal representation with two hexadecimal digits representing one byte. In this case, the data type must be provided with the additional specification HEX, namely

Each HEX-formatted data field needs exactly double the space it would need for the same format without the HEX option specification.


(Contents)(Previous)(Next)