IBM Support

PI69526: EXTEND CONSTANT KEYWORD ON LOAD TO SUPPORT POSITION AND CONSTANTIF

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as new function.

Error description

  • EXTEND CONSTANT KEYWORD ON LOAD TO SUPPORT POSITION AND
    CONSTANTIF
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * All DB2 12 for z/OS users of LOAD.                           *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * Support for CONSTANT with POSITION                           *
    * and CONSTANTIF on field-specification                        *
    * for LOAD                                                     *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    Users require the ability to specify a constant value for a
    
    field on LOAD when the value exists in the input record and
    
    to choose whether to use a constant value or the value from
    
    the input record.
    

Problem conclusion

  • The following change will be made to the DB2 Utility Guide and
    
    Reference in the LOAD syntax section.  These syntax changes and
    
    description should fully explain the intended function.
    
    
    
    field specification:
    
    
    
    >--+------------------------------------------+-------------->
    
       +-NULLIF--field selection criterion--------+
    
       +-DEFAULTIF-field selection criterion------+
    
       |        (1)                               |
    
       '-CONSTANTIF--field selection criterion----'
    
    
    
    
    
    >--+-----------------------------------+------------------------
    
       '-CONSTANT(-+-'string'----------+-)-'
    
                   +-X'hex-string'-----+
    
                   +-integer-----------+
    
                   +-CURRENT DATE------+
    
                   +-CURRENT TIME------+
    
                   +-CURRENT TIMESTAMP-+
    
                   '-NULL--------------'
    
    
    
    Notes:
    
        1. CONSTANTIF cannot be specified without CONSTANT
    
    
    
    CONSTANT(...)
    
    
    
    Specifies that the column that matches the field name should be
    
    loaded with a constant value. The field name that is associated
    
    with the CONSTANT keyword must match a column name of the
    
    specified table. The length and type derived from the specified
    constant value must be compatible with the target field.  For
    information on how LOAD determines the length and data type of
    a field, see the description of field-name in "Syntax and
    options of the LOAD control statement".  To specify a CONSTANT
    with an incompatible type, use a hexadecimal string for the
    constant value.
    
    Compatible types are:
    'string' : CHAR, VARCHAR, BINARY, VARBINARY, DATE, TIME,
    TIMESTAMP
    
    integer : INTEGER , SMALLINT, BIGINT (Note: INTEGER EXTERNAL is
    not compatible)
    
    X'hex-string' : compatible to all data types.  The hex string
    must be formatted correctly for the specified data type.
    
    CURRENT DATE : DATE
    
    CURRENT TIME : TIME
    
    CURRENT TIMESTAMP : TIMESTAMP
    
    NULL : compatible to all data types.
    
    A CONSTANT field cannot be specified for LOB or XML columns.
    
    If CONSTANT is used with no other field specification options,
    the constant value is used for the field and no position
    information is used for that field.  If CONSTANT is used with
    POSITION(*), position resolution will be applied using the
    value in the SYSREC as necessary.
    
    When a record is discarded and the CONSTANT keyword is used,
    the record in the discard data set reflects the original record
    from SYSREC, not the record as loaded with the constant
    value(s).
    
    'string' Specifies the character string that is to be inserted
    in the target column. If the specified string is in the form
    'string', it is assumed to be in the encoding scheme of SYSIN
    even if the encoding scheme of SYSREC is not the same.
    Conversion might be applied before inserting the string into
    the target column.
    
    X'hex-string' Specifies the hexadecimal value that is to be
    inserted in the target column. The hexadecimal value must be
    specified in the format X'hex-string'.
    
    integer Specifies the integer that is to be inserted into the
    target column. Valid values are between -2147483648 and
    2147483647.
    
    CURRENT DATE Specifies that the current date is to be inserted
    into the target column.
    
    CURRENT TIME Specifies that the current time is to be inserted
    into the target column.
    
    CURRENT TIMESTAMP Specifies that the current timestamp is to be
    inserted into the target column.
    
    NULL Specifies that the target column should be set to NULL.
    The target column must be nullable.
    
    CONSTANTIF field-selection-criterion
    
    Describes a condition that causes the DB2 column to be loaded
    with a constant value. You can write the
    field-selection-criterion with the same options as described
    under field-selection-criterion. If the contents of the
    CONSTANTIF field match the provided character constant, the
    field that is specified in field-specification is loaded with
    the value specified in the CONSTANT keyword.
    
    If the CONSTANTIF field is defined by the name of a VARCHAR or
    VARGRAPHIC field, DB2 takes the length of the field from the
    2-byte binary field that appears before the data portion of the
    VARCHAR or VARGRAPHIC field.
    
    Character-string constants should be specified in LOAD utility
    control statements in the character set that matches the input
    data record. Specify EBCDIC constants in the LOAD control
    statement if your data is in EBCDIC and specify UNICODE
    constants if your data is in UNICODE. You may also code the
    CONSTANTIF condition using the hexadecimal form. For example,
    if the input data is in EBCDIC and the control statement is in
    UTF-8, use (1:1)=X'31' in the condition rather than (1:1)='1'.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI69526

  • Reported component name

    DB2 OS/390 & Z/

  • Reported component ID

    5740XYR00

  • Reported release

    C10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2016-09-21

  • Closed date

    2016-12-16

  • Last modified date

    2017-05-16

  • APAR is sysrouted FROM one or more of the following:

    PI69405

  • APAR is sysrouted TO one or more of the following:

    UI43438

Modules/Macros

  • DSNURWUF DSNURELD DSNURPNL DSNURUFL DSNUGPRS DSNURWI  DSNURWBG
    DSNUGUCA DSNURPPI
    

Fix information

  • Fixed component name

    DB2 OS/390 & Z/

  • Fixed component ID

    5740XYR00

Applicable component levels

  • RC10 PSY UI43438

       UP17/01/05 P F701

Fix is available

  • Select the PTF appropriate for your component level. You will be required to sign in. Distribution on physical media is not available in all countries.

[{"Business Unit":{"code":"BU050","label":"BU NOT IDENTIFIED"},"Product":{"code":"SSEPEK","label":"DB2 for z\/OS"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"12.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}},{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SG19M","label":"APARs - z\/OS environment"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"12.0","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
16 May 2017