FORMAT


FORMAT specifies the format of the input data in the SYSREC data set when your input data is in certain formats.

FORMAT.png

Specify this option when your input data is in one of the following formats:

  • Format generated by REORG PLUS by creating an archive data set (SYSARC) with ARCHFORMAT BMC (FORMAT BMC)
  • Format generated by UNLOAD PLUS by using the FORMAT BMCLOAD option (FORMAT BMCUNLOAD)
  • Format generated by one of the following methods (FORMAT UNLOAD):
    • The IBM Db2 REORG utility by using the UNLOAD ONLY option
    • REORG PLUS by creating an archive data set (SYSARC) with ARCHFORMAT DB2
  • Comma-separated-value (CSV) format (FORMAT CSV)
  • Spanned-record format (FORMAT SPANNED)

BMC

BMC specifies that the input data in the SYSREC data set is in the format that was generated by REORG PLUS by using the SYSARC data set and the ARCHFORMAT BMC option. The SYSARC data set is an archive data set that contains rows that are discarded during the reorganization.

Restrictions

Note the following restrictions for FORMAT BMC:

  • LOADPLUS terminates when either of the following conditions exists:
    • You are loading LOB or XML data.
    • You also specify CONTINUEIF.
  • The table that you are loading must have the same definition as the table from which the archive rows originated. LOADPLUS loads the records that match the table OBID of the table that you specify in the INTO TABLE option or the input table OBID that you specify in the WHEN TABLE=obid option of the LOAD command. If the table definitions are different, the results of the load job are unpredictable.

    Important

    When you specify WHEN TABLE=obid, the OBID must be a decimal number. For more considerations when using this option, see WHEN.

  • If you specify FORMAT BMC, you cannot include field specifications on your LOAD command.
  • LOADPLUS allows you to specify a WHEN condition with the FORMAT BMC option. However, the condition must reference columns of the table only; it cannot reference a (start:end) field. See WHEN for more information.
  • This option is not valid when LOADPLUS invokes DSNUTILB. LOADPLUS issues message BMC50178E and terminates.

BMCUNLOAD

BMCUNLOAD specifies that the input data in the SYSREC data set is in an internal format that was generated by UNLOAD PLUS. This input data is data that was unloaded by using the UNLOAD PLUS option FORMAT BMCLOAD. For information about how to unload data in this format, see BMCLOAD option for LOADPLUS for DB2.

LOADPLUS loads the records from the input data set that match the table object identifier (OBID) that you specify in the WHEN TABLE=obid option of the LOAD command. In this case, the OBID is the object identifier that UNLOAD PLUS assigned when unloading the data, not the table’s Db2 object identifier. The LOAD control cards that UNLOAD PLUS generated contain this OBID. For more information about specifying this option with FORMAT BMCUNLOAD, see WHEN.

We strongly recommend that you use the LOAD control cards that UNLOAD PLUS generated.

FORMAT BMCUNLOAD is useful for migrating data to duplicate tables or from development to production databases. This option provides an improved performance benefit because the data is never converted to an external format and because LOADPLUS does not need to perform data verification.

For more information, see the following references:

Restrictions

Note the following restrictions for FORMAT BMCUNLOAD:

  • LOADPLUS terminates when either of the following conditions exists:
    • You are loading LOB or XML data.
    • You also specify CONTINUEIF.
  • If you specify FORMAT BMCUNLOAD, you cannot include field specifications on your LOAD command.
  • All partitions in the table space that you are loading must be in the same row format (basic or reordered).
  • With a few exceptions, the table that you are loading must have the same definition as the table that was unloaded with UNLOAD PLUS. For details, see Table structure considerations for FORMAT BMCUNLOAD.
  • This option is not valid when LOADPLUS invokes DSNUTILB. LOADPLUS issues message BMC50178E and terminates.

UNLOAD

This option specifies that the input data in the SYSREC data set is in the format that was generated in one of the following ways:

  • By the IBM Db2 REORG utility by using the UNLOAD ONLY option
  • By REORG PLUS by using an SYSARC data set and specifying ARCHFORMAT Db2

LOADPLUS loads the records from the input data set that match the OBID of the table that you specify in the INTO TABLE option or the input table OBID that you specify in the WHEN TABLE=obid option with FORMAT UNLOAD. Unlike the IBM Db2 LOAD utility, LOADPLUS allows you to specify a WHEN condition with the FORMAT UNLOAD option.

Restrictions

Note the following restrictions for FORMAT UNLOAD:

  • LOADPLUS terminates when either of the following conditions exists:
    • You are loading LOB or XML data.
    • You also specify CONTINUEIF.
  • If you specify FORMAT UNLOAD, you cannot include any field specifications on your LOAD command.
  • If you specify a WHEN condition, the condition must reference columns of the table only; it cannot reference a (start:end) field. For more information, see WHEN.
  • If you are loading an SYSARC file from REORG PLUS, the table that you are loading must have the same definition as the table from which the archive rows originated. LOADPLUS loads the records that match one of the following table OBIDs:

    • Table OBID of the table that you specify in the INTO TABLE option
    • Input table OBID that you specify in the WHEN TABLE=obid option

    If the table definitions are different, the results of the load job are unpredictable.

    Important

    When you specify WHEN TABLE=obid, the OBID must be a decimal number. For more considerations when using this option, see WHEN.

CSV

The CSV option allows you to load data that has been unloaded in comma-separated-value (CSV) format. This data can originate from any product that generates CSV output, including distributed databases, spreadsheet applications, and UNLOAD PLUS. In CSV-formatted data, a particular character separates each field from other fields. Also, in most cases, a particular pair of characters enclose each non-numeric field.

Important

CSV files are also referred to as comma-delimited or delimited files.

To use this option, your data and LOAD command must meet the requirements that are specified in Considerations-when-loading-CSV-data.

When you use more than one of the following CSV options, your syntax must follow the sequence that is shown in the syntax diagram. For example, if you specify TERMINATEDBY, it must always appear before ENCLOSEDBY.

Restrictions

LOADPLUS has the following restrictions on FORMAT CSV:

  • LOADPLUS terminates when either of the following conditions exists:
    • You are loading LOB or XML data.
    • You also specify CONTINUEIF.
  • When your input data is Unicode, LOADPLUS assumes that the values for the TERMINATEDBY, ENCLOSEDBY, and AND options are in EBCDIC format. LOADPLUS translates the values, if necessary, to the CCSID of the input data. Note the following restrictions for these options:
    • Do not specify values for these options that would expand to multiple-byte characters when they are translated.
    • If you specify a hexadecimal value, it must be in the internal format of the input, and the length must be no more than one byte.

TERMINATEDBY

This option specifies the character that your input data uses to delimit fields of data. The default is a comma. You cannot specify a null value for TERMINATEDBY.

ENCLOSEDBY

The ENCLOSEDBY option specifies the character that your input data uses on the left side to enclose fields of data. The default is a double quotation mark ('). You cannot specify a null value for ENCLOSEDBY.

For each field, if LOADPLUS does not find the ENCLOSEDBY character that you specify or default to, LOADPLUS assumes that the field is not enclosed by any character.

AND

This option specifies the character that your input data uses on the right side to enclose fields of data. You cannot specify a null value for AND.

If you do not specify a value for this option, LOADPLUS assumes that your input data uses the value that you specified for the ENCLOSEDBY option. If you did not specify a value for the ENCLOSEDBY option, LOADPLUS assumes that your input fields are enclosed by double quotation marks or are not enclosed by any character.

SPANNED

The SPANNED option indicates whether you are loading LOB or XML data from a variable-block spanned (VBS) data set that is in spanned-record format. 

NO

SPANNED NO, the default, indicates that the input data set is not in spanned-record format.

If your input is in spanned-record format and FORMAT SPANNED NO is in effect, results are unpredictable.

YES

SPANNED YES indicates that the input data set is in spanned record format. The following considerations apply when you specify SPANNED YES:

Warning

If you load a data set in a spanned-record format that was created by any product other than UNLOAD PLUS, the results are unpredictable. For example, LOADPLUS might appear to complete normally but not load the data correctly.

  • LOADPLUS terminates when any of the following conditions exist:
    • You specify FORMAT SPANNED YES, but your input data set is not allocated as RECFM=VBS with LRECL=32768.
    • You specify one of the following options:
      • CONTINUEIF
      • PRELOAD CONTINUE (two-phase load)
      • LOAD RESUME YES SHRLEVEL CHANGE SQLAPPLY
    • Your data or CCSID specification requires that LOADPLUS translate the data.
    • You are running a DSNUTILB load.
  • If you specify ENUMROWS AUTO, LOADPLUS cannot make accurate estimates when your input data is in spanned-record format. When you are loading from an input data set that is in spanned-record format, we recommend that you specify values for the ENUMROWS option.
  • When loading from an input data set that is in spanned-record format, LOADPLUS writes any discarded records to a discard data set that is in spanned-record format. If you have allocated a discard data set in your JCL, LOADPLUS overwrites the allocation parameters to RECFM=VBS, LRECL=32768.

    To load this data set, you must specify FORMAT SPANNED YES on your LOAD command.


 

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