Commands for Loading and Unloading Data and Catalog Contents 

Command Structure

Commands for loading and unloading data and catalog contents can be entered in the command file, which is entered when you call the Replication Manager. The commands consist of two sections:

 

Section 1

Section 2

Load commands

  • Keyword for the load operation (for example, FASTLOAD)
  • Description of the target table structure and the assigned of data fields in the source file to the columns in the target table
  • Keyword INFILE
  • Unchanged name of source file

Unload commands

  • Keyword for the unload operation (for example, DATAEXTRACT)
  • Database query to be used to extract the data from the source table

Overview

FASTLOAD command

FASTLOAD [<usage_spec>] TABLE <table_spec> <load_column_spec_mlt> <infile_spec>

DATALOAD command

DATALOAD TABLE <table_spec> [<duplicates_clause>] <load_column_spec_mlt> <infile_spec> [<longfile_spec_mlt>]

DATAEXTRACT command

DATAEXTRACT <select_expression> [OUTFIELDS <output_column_list>] <extract_files_spec>
| DATAEXTRACT
<restore_spec> TABLE <table_name> [<order_clause>] <extract_files_spec>

DATAUPDATE command

DATAUPDATE TABLE <table_spec> <acc_column_spec_mlt> <set_column_spec_mlt> <infile_spec> [<longfile_spec_mlt>]

TABLELOAD command

TABLELOAD <part_spec> <infile_spec> <restart_outfile_spec> [RESTART]

TABLEEXTRACT command

TABLEEXTRACT <part_spec> <outfile_spec>

CATALOGLOAD

CATALOGLOAD

CATALOGEXTRACT

CATALOGEXTRACT

DBLOAD

DBLOAD

DBEXTRACT

DBEXTRACT

FASTLOAD TABLE customer
  cno          1
  surname      2
  zip          3
  city         4
INFILE 'customer.data'

DATAEXTRACT cno, surname, zip, city from customer OUTFIELDS
  cno          1
  surname      2
  zip          3
  city         4
OUTFILE 'newcustomer.data'