IBM Support

PI46273: COMP-5 TRUNCATION OCCURS WHEN USING COMPUTE STATEMENT.

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • The following program demonstrates the problem:
    ...
             WORKING-STORAGE SECTION.
             01   SOMEPIC  PIC 9(10) VALUE ZEROS.
             01   SOME-COMP5  PIC S9(9) USAGE COMP-5 VALUE ZEROS.
             PROCEDURE DIVISION.
                   MOVE 1000042242 TO SOMEPIC.
                   DISPLAY 'TRY COMPUTE'.
                   COMPUTE SOME-COMP5 = SOMEPIC.
                   DISPLAY 'SOMEPIC:' SOMEPIC.
                   DISPLAY 'SOME-COMP5   :' SOME-COMP5.
                 STOP RUN.
    ...
    
    The result is 0000042242 instead of 1000042242.
    

Local fix

  • Using MOVE instead of COMPUTE works.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: Users of Enterprise COBOL v5 compiling and   *
    *                 running programs that have COMPUTE           *
    *                 statements to assign an external decimal     *
    *                 data item to a COMP-5 data item.             *
    *                                                              *
    ****************************************************************
    * PROBLEM DESCRIPTION: Incorrect output: When a COMPUTE A = B  *
    *                      statement is specified where A is a     *
    *                      COMP-5data item and B is an external    *
    *                      decimal data item, the COMP-5 receiver  *
    *                      was truncated based on the picture      *
    *                      clause.                                 *
    *                                                              *
    ****************************************************************
    * RECOMMENDATION: Apply provided service.                      *
    ****************************************************************
    When a COMPUTE A = B where the receiver A was defined as a
    COMP-5 data item and the sender B was defined as an external
    decimal data item, the compiler truncated the result assigned to
    the receiver based on the picture clause. A COMP-5 data item
    should not be truncated based on the picture clause.
    

Problem conclusion

  • The compiler was changed so when the receiver of a COMPUTE
    statement is a COMP-5 data item and the sender is a zoned data
    item, truncation to the picture clause will not be performed on
    the receiver.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI46273

  • Reported component name

    ENT COBOL FOR Z

  • Reported component ID

    5655W3200

  • Reported release

    520

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2015-08-04

  • Closed date

    2015-09-24

  • Last modified date

    2015-10-02

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

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

    PI46567

Modules/Macros

  • IGYCCBE
    

Fix information

  • Fixed component name

    ENT COBOL FOR Z

  • Fixed component ID

    5655W3200

Applicable component levels

  • R520 PSY UI31476

       UP15/09/30 P F509

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":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SS6SG3","label":"Enterprise COBOL for z\/OS"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"520","Edition":"","Line of Business":{"code":"LOB17","label":"Mainframe TPS"}},{"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":"520","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
02 October 2015