PM56631: V10 NEW FUNCTION

A fix is available

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as new function.

Error description

  • V10 new function.
    (N127)
    

Local fix

  • n/a
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: All DB2 10 for z/OS users                    *
    ****************************************************************
    * PROBLEM DESCRIPTION: This APAR is the enabling APAR for new  *
    *                      function introducing built-in functions *
    *                      PACK and UNPACK. This new function will *
    *                      be available starting with DB2 10 NFM.  *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    New built-in functions PACK and UNPACK are introduced via this
    APAR. Following is a short description of these functions.
    Please refer to the DB2 10 SQL Reference for more details.
    
    
    PACK
    ----
    The PACK function returns a binary string that represents all
    input arguments packed together according to their data type.
    
                                          .-----------------.
                                          |                 |
                                          V                 |
    >>--- PACK ---(CCSID 1208, expression ---.-------------.--)---><
                                             |             |
                                             '-,expression-'
    The schema is SYSIBM.
    
    The PACK function returns a varying-length binary string
    containing the data type information (the data type array) and
    data values for the arguments.
    The result data type is VARBINARY, and the maximum length is
    calculated based on the data types of the arguments.
    The result cannot be null.
    
    The VARBINARY result is constructed as follows:
      The first byte is a flag byte, reserved for future use.
      The following two bytes is an integer value set to the number
      of packed items (number of arguments).
      Following the data type array are the encoded values for the
      arguments in sequence specified on the function invocation.
    
    Example:
    SELECT PACK(CCSID 1208, 'Alina', DATE'1977-08-01', DOUBLE(0.5))
    FROM   SYSIBM.SYSDUMMYU;
    
    
    UNPACK
    ------
    The UNPACK function returns a row of values unpacked from the
    contents of a binary string input.
    
                                           .-------------------.
                                           |                   |
                                           V                   |
    >>--UNPACK(expr).*--AS(--name--datatype-.-----------------.-)-><
                                            |                 |
                                            '-,name--datatype-'
    The schema is SYSIBM.
    
    The UNPACK function returns a set of values (a row) unpacked
    from the varbinary string input. The AS clause specifies
    the data type, length, and encoding for the unpacked items.
    UNPACK is a "companion" function for PACK, in a sense that, the
    arguments that were packed using the PACK function can be
    unpacked back using the UNPACK function.
    UNPACK function can be used in a SELECT list only and must be
    followed by ".*" to flatten the row into a list of columns.
    Furthermore, the AS clause is required for identifying the
    column names and data types.
    UNPACK cannot be referenced in a View.
    
    Example:
    SELECT T1.C1, T1.C2, T1.C3, T1.C4,
           UNPACK(
                  UDF_SCORE( PACK(CCSID 1208, T1.C1, T1.C2, T1.C3))
                 ).* AS (ID INT, SCORE DOUBLE, CONF DOUBLE)
    FROM   T1;
    

Problem conclusion

Temporary fix

Comments

APAR Information

  • APAR number

    PM56631

  • Reported component name

    DB2 OS/390 & Z/

  • Reported component ID

    5740XYR00

  • Reported release

    A10

  • Status

    CLOSED UR1

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2012-01-24

  • Closed date

    2012-05-31

  • Last modified date

    2012-07-02

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

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

    UK79243

Modules/Macros

  •    DSNHAPLY DSNHPTAB DSNHSMF2 DSNHSMF3 DSNHSM5
    DSNHSM5T DSNHSYMH DSNXEBR
    

Fix information

  • Fixed component name

    DB2 OS/390 & Z/

  • Fixed component ID

    5740XYR00

Applicable component levels

  • RA10 PSY UK79243

       UP12/06/05 P F206

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.



Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

DB2 for z/OS

Software version:

A10

Reference #:

PM56631

Modified date:

2012-07-02

Translate my page

Machine Translation

Content navigation