IBM Support

PM60718: IMPLICIT CAST TO DECIMAL128 IS WRONG

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Implicit cast to Decimal128 is wrong as shown below:
    
    Compile command:
    ---------------
    xlc t.c -qarch=9 -qdfp
    
    Testcase:
    --------
    
    #define _XOPEN_SOURCE_EXTENDED 1
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #define __STDC_WANT_DEC_FP__
    #include <math.h>
    #include <float.h>
    #include <decimal.h>
    
    void main(void){
    
            double                  dbl1 = 3.14f;
            _Decimal128     dec128_1 = dbl1;
            printf("        <_Decimal128 Vaule> (%DDf)\n",
    dec128_1);
            return;
    }
    
    Actual Output:
    --------------
    <_Decimal128 Vaule> (0.000000)
    
    Expected Output:
    ---------------
    <_Decimal128 Vaule> (3.140000)
    

Local fix

  • N/A
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: User of converting between DFP and floating  *
    *                 point arch(8) and up.                        *
    ****************************************************************
    * PROBLEM DESCRIPTION: Converting between DFP and floating     *
    *                      point with arch(8) and up results in    *
    *                      abend.                                  *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    

Problem conclusion

  • Apply provided service.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PM60718

  • Reported component name

    C/C++ FOR MVS

  • Reported component ID

    56551210A

  • Reported release

    770

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2012-03-19

  • Closed date

    2012-03-20

  • Last modified date

    2016-05-09

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

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

    PM65012

Modules/Macros

  •    CCNETBY
    

Fix information

  • Fixed component name

    C/C++ FOR MVS

  • Fixed component ID

    56551210A

Applicable component levels

  • R770 PSY UK77246

       UP12/04/13 P F204

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":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SG19M","label":"APARs - z\/OS environment"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"770","Edition":"","Line of Business":{"code":"","label":""}},{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSQKCWV","label":"IBM C\/C++ for MVS\/ESA"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"770","Edition":"","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]

Document Information

Modified date:
08 August 2024