Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Loading user data with LOAD

The database administrator can load user data from an input file into a base table in a SESAM/SQL database with the utility statement LOAD. The input file is a SAM file of variable record length. Any of the following files can be used as the input file:

  • an input file whose format is specified by SESAM/SQL (standard format)

  • an input file whose format is specified by the user (user defined format)

  • a transfer file

  • a file in the LOAD_FORMAT

  • an input file in delimiter format

  • an input file in CSV format

The coded character set name (CCSN) of the input file is used for checking against the database’s coded character set.
In DELIMITER_FORMAT, in CSV_FORMAT and in the self-defined format, strings that are to be loaded are converted to the database’s coded character set if necessary.

LOAD error file

Users can specify the name of an error file in the LOAD statement's USING FILE clause.

The error file is only created or used by SESAM/SQL when an error occurs. LOAD appends new information to an existing error file. The entries relating to different LOAD statements are separated by two header lines.

The error file has the following name (not including the USING FILE clause): catalog.space.EXC.L


catalog

space

Name of the database.

Name of the user space containing the table into which the load operation
is to be performed.

In the case of a partitioned table the space name of the first partition is used.
The error file contains the error information for all partitions in the table.

EXC.L

Default value for the name of the error file for LOAD statements.

Temporarily disabling logging during LOAD OFFLINE

If a base table is located on a user space for which logging has been enabled, SESAM/SQL logs all DML and DDL statements that modify the table contents or the table definition in DA-LOG and CAT-LOG files. Logging is interrupted when data is loaded into this table with LOAD OFFLINE. In the case of LOAD ONLINE, logging continues. The database administrator must therefore create a SESAM backup copy of the user space on which the table is located with the utility statement COPY immediately after LOAD OFFLINE has completed and the CONSTRAINT CHECK has succeeded. Otherwise the user space will remain in the state “copy pending” and can only be worked on with utility or retrieval statements (see the “SQL Reference Manual Part 2: Utilities”).