NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
L-32
Considerations—LOAD
For full-table loads, LOAD sets the corrupt flag on the base table and indexes before
the load starts. If the operation finishes successfully, LOAD resets the flags. If the
operation fails, the corrupt flag indicates that the file is unusable.
If the target is a table, LOAD automatically loads any indexes on the table after it
loads the table.
When you load a very large key-sequenced file and the data must be sorted, you
might want to use a partitioned scratch file. Use FUP CREATE to create the scratch
file and the SCRATCH option of LOAD to identify it.
LOAD versus COPY
LOAD resembles COPY in that both transfer data from an existing source to an
existing target. Following are the major differences between LOAD and COPY:
°
LOAD is typically used to enter initial data into an empty file. COPY is
typically used to add data to a file that already contains data.
°
LOAD erases or overwrites existing records. COPY does not erase or overwrite
existing records.
°
LOAD does not write to unstructured files or non-disk files but COPY does.
°
COPY and LOAD provide the same in-options and move-options, but
LOAD provides additional key-sequence-options for loading key-
sequenced files. These options let you load single partitions, sort output, and
specify the amount of slack to leave in index and data blocks.
°
COPY is slower than LOAD.
Character set compatibility
The following rules govern the transfer of data across character sets. A LOAD that
violates these rules terminates with an error.
Source and
Target File Types
Source Field
Character Set
Target Field
Character Set
SQL to SQL UNKNOWN Any character set
ISO88591 ISO88591
... ...
ISO88599 ISO88599
KANJI KANJI
KSC5601 KSC5601
SQL to Enscribe UNKNOWN PIC X or PIC N
ISO88591 PIC X
... ...
ISO88599 PIC X
KANJI PIC N