The utility statements UNLOAD and LOAD make it possible to transfer user data from one base table or view to another base table.
For example, to transfer data from base table A to base table B, users on table A unload the data from table A with UNLOAD, specifying the LOAD_FORMAT option. SESAM/SQL applies a structure to the output file that allows the users on table B to use it as an input file for B by executing LOAD with the UNLOAD_FORMAT option.
If A is a base table that is to be unloaded and for which a primary key has been defined, the output file created by an UNLOAD with LOAD_FORMAT is sorted on its primary-key values. If the primary key in table B (into which data is to be loaded) matches the primary key in table A, the loading operation can be accelerated by using LOAD SORTED to load the data into B.
The columns from which data is to be unloaded and into which data is to be loaded in the two tables between which the data is transferred must be defined identically.