Data Unload Utility: dbdump

The syntax definition for the commands file is as shown:

dbdump_commands: define_record_statement for_record_statement

The following is sample commands file showing dump instructions.

DEFINE RECORD ord_rec AS

( ord_no, item_name, date, item_qty ) FIELD DELIMITER ' ' ;

FOR RECORD ord_rec dump into ord_dat

USING SELECT order_no, product, order_date, qty

FROM items;

5.5.1The DEFINE RECORD Statement

The DEFINE RECORD statement is used to define the record of the output file. The following are the definitions that are made known by the DEFINE RECORD statement:

Names the record of the output file

Names the fields of the record

Specifies whether the records in the data file are variable length records or fixed length records

If fixed length records, specifies the position and data type of the field

The following is the syntax definition of the DEFINE RECORD statement:

DEFINE RECORD record_name

[ OF FIXED LENGTH record_length AS (

field_name position_specification type_specification,

...

)

]

[ FIELD DELIMITER delimiter_char ]

[ RECORD DELIMITER delimiter_string ] ;

position_specification::

POSITION ( start_position : end_position )

type_specification:: CHAR

SHORT

LONG

FLOAT

DOUBLE

The following are the variable descriptions of the DEFINE RECORD syntax:

record_name is the name used to refer to the records found in the data file.

FairCom Corporation

5-3

Page 83
Image 83
HP c-tree-SQL ISQL and Tools manual Data Unload Utility dbdump, Short Long Float Double