Note the following syntax rules for command files.
Syntax Rules for Calling the Loader
Individual commands in a command file are separated by a line, at the beginning of which there is a double forward slash //.
After a double forward slash // at the start of the line, you can enter comments. The comments are ignored by the Loader during the processing of the command file.
CREATE TABLE customer
(cno FIXED(4) CONSTRAINT cno BETWEEN 1
AND 9999 KEY,
salutn CHAR(7) CONSTRAINT salutn IN ('Mr', 'Ms', 'company'),
name CHAR(10) NOT NULL,
zip CHAR(5) CONSTRAINT
SUBSTR(zip_dom,1,5) LIKE '(0-9)(0-9)(0-9)(0-9)(0-9)',
address CHAR(25) NOT NULL)
//
FASTLOAD TABLE customer
cno 1
name 2
zip 3
address 4
INFILE 'customer.data'
//create index
CREATE INDEX customer_index ON customer (name)
//
DATAEXTRACT
cno, name, zip, address from customer
OUTFIELDS
cno 1
name 2
zip 3
address 4
OUTFILE 'newcustomer.data'