HP (Hewlett-Packard) c-tree-SQL ISQL and Tool reference Guide Printer User Manual


 
Data Unload Utility: dbdump
FairCom Corporation 5-5
( no, name, loc ) FIELD DELIMITER ' ' ;
FOR RECORD dept_rec DUMP INTO deptrecs_out
USING SELECT dept_no , dept_name , location
FROM ADMIN.dept ;
The following is the commands file to write records from the customer table. The output data
file is cust_out which is a binary file in the fixed length record format.
DEFINE RECORD cust_rec OF FIXED LENGTH 37
AS (
no POSITION (1:4) LONG,
name POSITION (5:15) CHAR,
street POSITION (16:28) CHAR,
city POSITION (29:34) CHAR,
state POSITION (35:36) CHAR
) ;
FOR RECORD cust_rec DUMP INTO cust_out
USING SELECT cust_no, cust_name, cust_city, cust_street, cust_state
FROM ADMIN.customer ;
The following is the commands file to dump records from the orders table. The output data file
is orders_out which is a binary file in the fixed length record format.
DEFINE RECORD orders_rec OF FIXED LENGTH 31
AS (
no POSITION (1:4) LONG,
date POSITION (6:16) CHAR,
prod POSITION (18:25) CHAR,
units POSITION (27:30) LONG
) ;
FOR RECORD orders_rec DUMP INTO orders_out
USING SELECT order_no, order_date, product, quantity
FROM ADMIN.orders ;