IBM Support

PI76060: INCORRECT OUTPUT WITH CONSECUTIVE INSPECT REPLACING STATEMENTS AND OPT(1) OR OPT(2)

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When compiling with OPT(1) or OPT(2), consecutive INSPECT
    REPLACE statements may result in incorrect output if the
    BEFORE or AFTER clause is specified.  For example:
    
         INSPECT field1 REPLACING ALL 'Z' BY 'B'
         INSPECT field1 REPLACING ALL 'X' BY 'B' AFTER INITIAL 'B'
    

Local fix

  • Use OPT(0)
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: Users of Enterprise COBOL V5.1 compiling     *
    *                 and running programs using the OPT(1|2)      *
    *                 compiler option, where the programs contain  *
    *                 two consecutive INSPECT REPLACING            *
    *                 statements that inspect the same data item,  *
    *                 where the new characters in the first        *
    *                 INSPECT statement appear in a BEFORE or      *
    *                 AFTER clause of the second INSPECT           *
    *                 statement.                                   *
    *                                                              *
    ****************************************************************
    * PROBLEM DESCRIPTION: Incorrect output at runtime: The first  *
    *                      INSPECT REPLACING statement does not    *
    *                      change the INSPECTed data item,         *
    *                      causing the second INSPECT statement    *
    *                      to produce an incorrect result.         *
    *                                                              *
    ****************************************************************
    * RECOMMENDATION: Apply the provided PTF.                      *
    *                                                              *
    ****************************************************************
    The compiler was attempting to group the two INSPECT REPLACING
    statements into one, which is incorrect when a BEFORE or AFTER
    clause is used.
    

Problem conclusion

  • The compiler was fixed to no longer combine consecutive INSPECT
    REPLACING statements if one has a BEFORE or AFTER clause.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI76060

  • Reported component name

    ENT COBOL FOR Z

  • Reported component ID

    5655EC600

  • Reported release

    610

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2017-02-06

  • Closed date

    2017-02-14

  • Last modified date

    2017-03-02

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

    PI75420

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

Modules/Macros

  •    IGYQCBE
    

Fix information

  • Fixed component name

    ENT COBOL FOR Z

  • Fixed component ID

    5655EC600

Applicable component levels

  • R610 PSY UI44685

       UP17/02/25 P F702

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":"BU048","label":"IBM Software"},"Product":{"code":"SS6SG3","label":"Enterprise COBOL for z\/OS"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"6.1","Edition":"","Line of Business":{"code":"LOB70","label":"Z TPS"}}]

Document Information

Modified date:
05 September 2024