IBM Support

PI69405: 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 11 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

Temporary fix

Comments

  • 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'.
    

APAR Information

  • APAR number

    PI69405

  • Reported component name

    DB2 OS/390 & Z/

  • Reported component ID

    5740XYR00

  • Reported release

    B10

  • Status

    CLOSED UR1

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2016-09-19

  • Closed date

    2016-10-31

  • Last modified date

    2016-12-01

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

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

    PI69526 UI42173

Modules/Macros

  • DSNUGPRS DSNUGUCA DSNURELD DSNURPNL DSNURPPI
    DSNURUFL DSNURWBG DSNURWI  DSNURWUF
    

Publications Referenced
SC19406702    

Fix information

  • Fixed component name

    DB2 OS/390 & Z/

  • Fixed component ID

    5740XYR00

Applicable component levels

  • RB10 PSY UI42173

       UP16/11/15 P F611

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":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEPEK","label":"Db2 for z\/OS"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}},{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SG19M","label":"APARs - z\/OS environment"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.0","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
01 December 2016