Limited supportBMC provides limited support for this version of the product. As a result, BMC no longer accepts comments in this space. If you encounter problems with the product version or the space, contact BMC Support.BMC recommends upgrading to the latest version of the product. To see documentation for that version, see UNLOAD PLUS for DB2 13.1.

INFILE


You can specify the INFILE option to use a copy or a data set other than the Db2 table space data set as the source of the input data. When you are unloading from multiple table spaces, the INFILE option applies to all table spaces.

INFILE.png

This option is valid only when DIRECT YES is in effect.

The following table lists the alternate sources of input data that you can use, and tells you which INFILE option to use for each input type:


Input type

INFILE option

Full or incremental image copy data sets, including inline copies

IMAGECOPY or ddname

Encrypted copies created by BMC AMI Copy

IMAGECOPY

Cabinet copies created by the Recovery Management or BMC AMI Recovery solution

IMAGECOPY

DSN1COPY sequential data sets

ddname

Instant Snapshot copies created by BMC AMI Copy

SNAPCOPY

Online consistent copies created by the Online Consistent Copy component of the Recovery Management or BMC AMI Recovery solution

SNAPCOPY

VSAM linear data sets

VSAMDD or VSAMDDPREFIX

VSAM FlashCopy image copies

VSAMDD or VSAMDDPREFIX

Restrictions

The following restrictions apply to the INFILE option:

  • You cannot specify FILTERPART YES when unloading from image copies.
  • UNLOAD PLUS does not unload from LOB or XML copy data sets. However, you can unload from a copy of the base table if you do not select any LOB or XML columns.
  • UNLOAD PLUS does not support unloading from PBR2 inline copies which contain more than one part.

Additional considerations

The following additional considerations apply to the INFILE option:

  • Unpredictable results might occur if the data sets do not match the options that you specify:
    • If the input data set is an inline copy, specify INLINE YES.
    • If the input data set is an incremental image copy, specify the INCREMENTAL option.
    • If you are unloading all partitions of partitioned table space, ensure that the data set includes a full image copy of all of the partitions.
    • If you are unloading specific partitions, ensure that the input provides all of the necessary partitions. Provide the full image copy data set by using one ddname, or provide image copies for each partition by using multiple ddnames that end with a partition number.
  • When you specify INFILE to unload any of the following types of copy data sets, all selected rows must be at the current version (as defined in SYSIBM.SYSTABLES):
    • An incremental image copy
    • Any image copy created with the SYSTEMPAGES NO copy option
  • When you specify INFILE, UNLOAD PLUS bypasses ANALYZE processing. Therefore, if you are dynamically allocating output data sets, you must also specify one of the following command options to provide data set sizing information:
    • ESTROWS
    • LIMIT
    • SPACE

      Important

      The SPACE installation option does not provide this information.

  • To unload all rows of a copy data set that contains more partitions than the corresponding Db2 table space, specify the following:
    • INFILE ddname
    • A DDLIN data set that contains DDL that matches the copy data set that you are unloading

IMAGECOPY

Specify INFILE IMAGECOPY to have UNLOAD PLUS use the specified full or incremental image copy data set that is in the SYSIBM.SYSCOPY table or the BMCXCOPY table; BMCXCOPY applies only if you are unloading an encrypted image copy created by BMC AMI Copy or a cabinet copy.

Important

Encrypted image copies are registered in BMCXCOPY as STYPE e. Cabinet copies are registered as COPY_TYPE C.

Partitioned table spaces

If the table space is partitioned, UNLOAD PLUS uses uses the latest copy for each partition, even if not all copies are at the same RBA.

(BMC.DB2.SPE2304) Inline copies produced using REORG ICLIMIT are also  considered.

UNLOAD PLUS can unload multi-data-set, nonpartitioned table spaces only from a single image copy that contains all of the individual data sets. You cannot unload nonpartitioned table spaces from separate image copy data sets where DSNUM is not equal to 0.

Additional restrictions and considerations

In addition to the general restrictions and considerations for the INFILE option, the following restrictions and considerations apply to INFILE IMAGECOPY:

  • To unload an encrypted copy that was created by BMC AMI Copy, you must

    • Run UNLOAD PLUS on a processor that supports encryption
    • Use the KEYDSNAM installation option to specify your key data set name

    Important

    For more information about creating encrypted copies and about the key data set, see the BMC AMI Copy for Db2 documentation.

  • UNLOAD PLUS does not unload from copies created with the SYSTEMPAGES NO option if those copies contain compression dictionaries created during Db2 SQL INSERT processing.
  • UNLOAD PLUS does not automatically use local backup or recovery copies. To unload a local backup or recovery copy, you must specify it with the INFILE ddname option.
  • UNLOAD PLUS prevents unloading from an image copy taken before certain materialized pending definition ALTERs. Unload verifies SYSCOPY.ICTYPE=A together with SYSCOPY.STYPE settings as mentioned in the following table and terminates when the image copy has a lower RBA than the ALTER registered in SYSCOPY.

    STYPE

    Type of Alter

    A

    Partition was added or inserted

    B

    MEMBER CLUSTER was changed

    C

    The column was added to the table or dropped

    D

    DSSIZE was altered or the default value for the column was altered

    F

    Pagesize was altered

    H

    The table was altered to HASH or the hash space was changed

    I

    The inline length of a LOB was altered

    M

    MAXPARTITIONS was altered

    R

    Rotate partitions

    S

    SEGSIZE was altered

    T

    A table space attribute was altered

    U

    After Column drop default

    X

    Reorganization dropped one or more PBG partitions

  • If you specify -integer and you are running SHRLEVEL REFERENCE, UNLOAD PLUS looks only for image copies that are registered as REFERENCE copies and ignores image copies that are registered as CHANGE. If you are running SHRLEVEL CHANGE, UNLOAD PLUS looks for copies that are registered as REFERENCE and copies that are registered as CHANGE.

FULL

FULL, which is the default, tells UNLOAD PLUS to unload from a full image copy. By default, or if you specify 0 (with no minus sign), UNLOAD PLUS unloads from the most recent full image copy found in the SYSIBM.SYSCOPY table or the BMCXCOPY table; BMCXCOPY applies only if you are unloading an encrypted copy created by BMC AMI Copy or a cabinet copy.

To unload from a full image copy before the most recent one, specify -integer to direct UNLOAD PLUS to count the specified number of full image copies back from the most recent one, and unload that image copy. For example, if you specify INFILE IMAGECOPY FULL -1, UNLOAD PLUS unloads the full image copy immediately preceding the most recent one. Note the minus sign in front of the integer.

If you specify -integer with the FULL keyword, UNLOAD PLUS looks only for full image copies. UNLOAD PLUS ignores any incremental image copies that it finds.

INCREMENTAL

This option tells UNLOAD PLUS to unload from an incremental image copy. When unloading from an incremental image copy, UNLOAD PLUS performs the following actions:

  • Accesses the previous full copy for data set information (but does not unload from that copy)
  • Reads all rows in the incremental image copy (not only the rows that changed) and unloads those that match the SELECT statement criteria

By default, or if you specify 0 (with no minus sign), UNLOAD PLUS unloads the most recent incremental image copy found in the SYSIBM.SYSCOPY table or the BMCXCOPY table; BMCXCOPY applies only if you are unloading an encrypted copy created by BMC AMI Copy or a cabinet copy.

If you want to unload from an incremental image copy that was created before the most recent one, specify -integer to direct UNLOAD PLUS to count the specified number of incremental image copies back from the most recent one and unload that copy. For example, if you specify INFILE IMAGECOPY INCREMENTAL -1, UNLOAD PLUS unloads the incremental image copy that was created just before the most recent one.

Additional considerations

In addition to the general restrictions and considerations for the INFILE option and the considerations for INFILE IMAGECOPY, the following considerations apply to the INCREMENTAL keyword:

  • If you specify -integer with the INCREMENTAL keyword, UNLOAD PLUS counts only incremental image copies. UNLOAD PLUS does not include any full image copies that it finds in the -integer count.
  • UNLOAD PLUS cannot use the INFILE option to unload incremental image copies that do not contain dictionary pages when the image copy contains compressed data.

ddname

Use this option to specify a ddname or ddname prefix when unloading from a DSN1COPY sequential data set, a specific full or incremental image copy, or an inline image copy. For more information about specifying ddnames, see UNLOAD-PLUS-input-copy-data-set.

Important

Do not use this option to unload from a cabinet copy; use INFILE IMAGECOPY instead.

If you specify INFILE ddname, UNLOAD PLUS unloads all rows from the specified data set that match your SELECT statement criteria.

INFILE ddname with DDL

When you specify INFILE ddname and supply DDL (using a DDLIN data set), the following warnings and restrictions apply:

  • The DDL must match the definition of the object that you are unloading. If they do not match, results are unpredictable.
  • Ensure that the DDL reflects the limit key specifications that applied to the table space when the image copy was taken. This requirement is particularly important if you specify PART on the UNLOAD command and any of the following actions were performed on the table space after the copy was taken:

    • Rotated partitions
    • Altered limit keys
    • Rebalanced partitions during a reorganization

    If the DDL does not reflect the appropriate limit key specifications, results are unpredictable.

  • All selected rows must be at version 0. Otherwise, UNLOAD PLUS terminates.
  • If either of the following conditions exists, you must specify the OBID of the table, either with each SELECT statement or on each CREATE TABLE statement in the DDLIN data set:
    • You specify multiple SELECT statements.
    • You are unloading a multi-table table space.
  • If you also specify LOGICAL PART, UNLOAD PLUS ignores the LOGICAL keyword and considers the specified partitions to be physical partitions.

Additional restrictions and considerations

In addition to the general restrictions and considerations on the INFILE option, the following restrictions and considerations apply to INFILE ddname:

  • The following Db2 catalog information must match the copy that you are unloading:
    • The database identifier (DBID) and page set identifier (PSID) of the database and table space that contain the specified tables, unless you specify ON MESSAGE 50253 CONTINUE UTILITY
    • The OBIDs of the tables that you specify, unless you specify the OBID for the table by using the OBID option
    • The table definitions

      However, if you added more columns to a table since the copy was made and you are unloading those columns, the new columns contain their default values.

      If the table definitions that are in the Db2 catalog do not match the table in the image copy, you can provide DDL by using the DDLIN data set. UNLOAD PLUS can then use DDL for Db2 object definitions, instead of using the object definitions in the Db2 catalog. For more information about this data set, see DDLIN-data-sets-in-UNLOAD-PLUS.

  • UNLOAD PLUS does not unload copies that contain compression dictionaries created during Db2 SQL INSERT processing for either of the following types of copies:
    • Copies created with the DSN1COPY utility
    • Copies created with the SYSTEMPAGES NO option
  • Concatenating multiple image copy data sets, particularly when mixing copy data sets from tape with copy data sets from DASD, produces unpredictable results.
  • When unloading an image copy on a Db2 subsystem other than the one on which the copy was created, the following information applies:
    • For a range-partitioned table space, UNLOAD PLUS unloads only the number of partitions that are defined on the target subsystem. To ensure that you unload the partitions that you intend, we recommend that you use a DDLIN data set.
    • For a partition-by-growth table space, UNLOAD PLUS unloads only the number of partitions that exist on the target subsystem. To ensure that you unload the partitions that you intend, we recommend that you use a DDLIN data set and specify INLINE YES.
  • When versioning information contained in the image copy does not match that of the object on the target subsystem unpredictable results may occur.

FULL

Specify this option to tell UNLOAD PLUS that the specified file is a full image copy, a DSN1COPY data set, or an inline copy.

INLINE

Use this option to specify whether UNLOAD PLUS should treat the copy that is associated with the specified ddname as an inline copy. The following table describes the values that you can specify for this option:


Values for the INLINE option

Value

Description

YES

Specify INLINE YES after FULL to tell UNLOAD PLUS to treat the copy that is associated with the ddname as an inline copy. This option enables UNLOAD PLUS to unload data from out-of-sequence pages.

When you specify INLINE YES, UNLOAD PLUS treats all image copies as inline copies and reads the data twice to ensure data integrity. This action can result in performance degradation especially for copies that reside on tape.

NO

Specify INLINE NO after FULL to tell UNLOAD PLUS not to treat the copy as an inline copy.

Warning

UNLOAD PLUS supports unloading data from an inline image copy when you specify INFILE ddname and INLINE YES. Inline image copies can have out-of-sequence pages. However, UNLOAD PLUS cannot determine pages that might be out of sequence before processing begins unless you also specify INLINE YES. Using an inline copy that contains pages that are out of sequence can cause a serious page error (see message BMC50251S) if you specify INLINE NO.

INCREMENTAL

Specify this option to tell UNLOAD PLUS that the specified file is an incremental image copy. If INFILE ddname specifies an incremental image copy, you must use this option or UNLOAD PLUS assumes that FULL (the default) applies, and unpredictable results might occur. When using an incremental image copy, UNLOAD PLUS reads all rows in that image copy, not only the rows that changed.

Important

UNLOAD PLUS cannot use the INFILE option to unload incremental image copies that do not contain dictionary pages when the image copy contains compressed data.

SNAPCOPY

If you specify INFILE SNAPCOPY, UNLOAD PLUS uses the data set for the specified Instant Snapshot copy or online consistent copy that is registered in the BMCXCOPY table (ICTYPE F or C).

-integer

UNLOAD PLUS always unloads from a full copy. If you specify 0 (with no minus sign), UNLOAD PLUS unloads from the most recent Instant Snapshot copy or online consistent copy that is registered in the BMCXCOPY table.

To unload from a copy that precedes the most recent one, specify -integer to tell UNLOAD PLUS which preceding Instant Snapshot copy or online consistent copy to unload (where -integer indicates the copy’s relation to the most recent copy). For example, specifying INFILE SNAPCOPY -1 unloads the copy immediately preceding the most recent one. INFILE SNAPCOPY -3 unloads the third copy preceding the most recent one.

UNLOAD PLUS can unload multi-data-set, nonpartitioned table spaces only from a single image copy that contains all of the individual data sets. You cannot unload nonpartitioned table spaces from separate image copy data sets where DSNUM is greater than 0.

VSAMDD

Specify this option to unload from a VSAM linear data set or VSAM FlashCopy image copy data set. The data set must be specified as a VSAMDD DD statement in your JCL.

For more information about specifying ddnames, see VSAMDD-data-sets.

Restriction

You cannot specify multiple VSAM data sets for nonpartitioned objects.

Considerations

The following considerations apply to the VSAMDD option:

  • When unloading multiple partitions, add the partition number as a suffix to the VSAMDD DD statements in your JCL.
  • With this option, you can specify up to 99 VSAM data sets for partitioned objects. If you need to unload from more than 99 data sets, use the VSAMDDPREFIX option.

VSAMDDPREFIX prefix

Use this option to specify a prefix other than VSAMDD to use when unloading from a VSAM linear data set or VSAM FlashCopy image copy data set. This option enables you to unload from more than 99 data sets.

Your JCL must include DD statements that match the prefix that you specify. For multiple data sets, you must append n to the ddnames in the DD statements in your JCL, where n is a numeric value. These ddnames must not exceed eight characters.

For more information about specifying ddnames, see VSAMDD-data-sets.

Restriction

You cannot specify multiple VSAM data sets for nonpartitioned objects.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*