NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
L-34
Considerations—LOAD
Rules for using CLASS TAPE DEFINEs or labeled tapes are described in the
discussion of the FUP COPY command in the File Utility Program (FUP)
Reference Manual.
Loading data into Enscribe files
An Enscribe file into which you load data must be an existing file. LOAD does not
load data into any alternate-key file associated with an Enscribe file.
The target file must have default values defined for fields that do not have source
fields mapped to them. To define a default value for a data item, use the VALUE IS
clause.
When you load key-sequenced partitioned files, consider the following:
In a partitioned file, the range of keys for the different partitions is stored in the
primary partition.
To load a single partition (primary or secondary), specify the name of the
partition as out-file, and specify the name of the volume that contains the
partition in the PARTOF option. If you attempt to load a secondary partition
when you have not specified the PARTOF option, you receive an error message.
To load all partitions, specify the name of the primary partition as out-file
and omit the PARTOF option.
If the input records must be sorted, then disk space for the sort scratch file and for
the output file must exist concurrently during the sorting phase.
Be careful when you use PAD and TRIM options. If your data contains the trim-
character or pad-character, data might be added or lost. Use a pad-
character or trim-character that does not appear in your data. For
example, suppose you pad each record in a data file with zeros to a standard size in
bytes and then store the records in another file. If you later trim the trailing zeros
when you load the stored records, zeros at the end of the original data are also
trimmed.
Loading SQL tables
The target file must have default values defined for columns that do not have source
fields mapped to them. To define default values, use the DEFAULT clause of the
CREATE TABLE or ALTER TABLE command.
If a record from a non-SQL source is not long enough to supply data to all fields
mapped to target columns, each target column whose source field is missing must
have a default value defined for it.
In general, if a source record from a non-SQL source does not end exactly at a field
boundary, an error occurs. The following exceptions apply:
If the record ends in the middle of a VARCHAR field, the end of the record
defines the end of the VARCHAR data.
If the file is an EDIT file and the record ends in the middle of a field, SQL adds
enough blanks to the end of the input record to fill the field. In such a case,