Before running LOAD

Certain activities might be required before you run the LOAD utility, depending on your situation.

You cannot run the LOAD utility on the DSNDB01 or DSNDB06 databases, except to add rows to the following catalog tables:

  • SYSSTRINGS
  • MODESELECT
  • LUMODES
  • LULIST
  • USERNAMES
  • LUNAMES
  • LOCATIONS
  • IPNAMES

If you are using LOAD for a partition-by-growth table space, you can load data only at the table space level, not at the partition level.

Preprocessing input data

No sorting of the data rows occurs during LOAD processing. Rows are loaded in the physical sequence in which they are found.

Recommendation: Sort your input records in clustering sequence before loading the data.

You should also:

  • Ensure that no duplicate keys exist for unique indexes.
  • Correct check constraint violations and referential constraint violations in the input data set.
  • Ensure that any input data that is provided for a security label column is a valid security label. Security label columns are defined with the AS SECURITY LABEL clause. These columns are used for multilevel security with row-level granularity.

When loading data into a segmented (non-UTS) table space, sort your data by table to ensure that the data is loaded in the best physical organization.

Loading data by using a cursor

Begin general-use programming interface information.

Before you can load data by using a cursor, also known as cross-loading, you need to bind the DSNUT131 package at each location from which you plan to load data. A local package for DSNUT131 is bound by installation job DSNTIJSG when you install or migrate to a new version of Db2 for z/OS®.

The following example statement binds the DSNUT131 package at a remote location:

BIND PACKAGE(location.DSNUT131) 
         MEMBER(DSNUGSQL) -
         ACTION(ADD) ISOLATION(CS) ENCODING(EBCDIC) -
         VALIDATE(BIND) CURRENTDATA(NO) -
         LIBRARY('prefix.SDSNDBRM')

Start of changeYou can improve the performance of cross-loading from a remote Db2 11 subsystem in new-function mode, or a later version of Db2, to a local Db2 13 subsystem by binding the DSNUTIL and DSNUT131 packages again on the local and remote subsystems with the DBPROTOCOL(DRDACBF) option. However, be aware that if you bind DSNUTIL with this option, you cannot use the EXEC SQL utility to issue remote dynamic SQL statements that modify data; you can use EXEC SQL only to declare a cursor, which can then be used by LOAD to make updates.End of change

The following example statements bind the DSNUTIL and DSNUT131 packages on the local subsystem, and bind the DSNUT131 package on the remote subsystem:

BIND PACKAGE(DSNUTIL) MEMBER(DSNUGSQL) -
         ACTION(ADD) ISOLATION(CS) ENCODING(EBCDIC) -
         VALIDATE(BIND) CURRENTDATA(NO) -
         DBPROTOCOL(DRDACBF) -
         LIBRARY('prefix.SDSNDBRM')
BIND PACKAGE(DSNUT131) MEMBER(DSNUGSQL) -
         ACTION(ADD) ISOLATION(CS) ENCODING(EBCDIC) -
         VALIDATE(BIND) CURRENTDATA(NO) -
         DBPROTOCOL(DRDACBF) -
         LIBRARY('prefix.SDSNDBRM')
BIND PACKAGE(location.DSNUT131) MEMBER(DSNUGSQL) -
         ACTION(ADD) ISOLATION(CS) ENCODING(EBCDIC) -
         VALIDATE(BIND) CURRENTDATA(NO) -
         DBPROTOCOL(DRDACBF) -
         LIBRARY('prefix.SDSNDBRM')

End general-use programming interface information.

Running LOAD on a table with a spatial index

You cannot run the LOAD utility to load data into a table on which a spatial index is defined. You need to drop the spatial index, run LOAD on the table, and then create the spatial index again.