Syntax
<dataload_statement> ::=
DATALOAD TABLE
DATALOAD TABLE customer
cno 01-04
surname 06-12
zip 14-18
city 20-31
INFILE 'customer.data' FORMATTED
DATALOAD TABLE article
foa 01-08 CHAR
des 09-39 CHAR
stock 40-43 INTEGER
min_ord 44-45 INTEGER
ordered 46-49 INTEGER
del_date 50-57 CHAR
price 58-65 DECIMAL (2)
weight 66-69 REAL
INFILE 'article.data' FORMATTED
Use
The DATALOAD command is a
command for loading data. Like the FASTLOAD command, the DATALOAD command reads data from a file and writes it to a database instance table.DATALOAD
command files are processed while the database is in operation.Backing up the log at the same time can impair performance with the result that the command file takes longer to process than with FASTLOAD. Writing the log simultaneously, however, allows the entries to be undone if the event of an error by reviewing the log.
Prerequisites
The target table exists on the database instance. Otherwise, it must be created before the DATALOAD command is executed.
Process Flow
The Replication Manager generates an internal INSERT command from the DATALOAD command and then executes it. The
REPM Server uses a communication packet to transfer the data records directly to the relevant table on the database instance. Log entries are written for these table changes.During the load operation, all of the tables modified by this DATALOAD command can also be read and changed by other users.
Result
The data in the
source file has been loaded into the target table(s). All of the changes made to the target table(s) as a result have also been written to the log on the database instance.Errors
If the load operation cannot be ended successfully, the Replication Manager logs the last row that was entered successfully in the data file, the number of rows inserted, and the number of rows rejected (
Replication Manager log file).