A fix is available
APAR status
Closed as program error.
Error description
When the BY value involves a compiler temporary, such as the result of a FUNCTION CHAR() call, the optimizer incorrectly drops code to populate the compiler temporary, and a residual value from the stack is used.
Local fix
Compile at OPT(0), or move the intended BY value to an intermediate item, and use the latter in the INSPECT.
Problem summary
**************************************************************** * USERS AFFECTED: Users of Enterprise COBOL V5.2 compiling * * and running COBOL programs that contain * * INSPECT statements with the REPLACING * * phrase and that have been compiled with * * compiler option OPT(1) or OPT(2). * * * **************************************************************** * PROBLEM DESCRIPTION: Incorrect output at runtime. * * * **************************************************************** * RECOMMENDATION: Apply the provided PTF. * * * **************************************************************** The compiler was incorrectly setting internal flags for INSPECT REPLACING operands at OPT(1) and higher, causing the INSPECT statement to replace bytes in the destination with invalid data.
Problem conclusion
The compiler was changed to set the internal flags correctly which will result in correct INSPECT REPLACING behavior.
Temporary fix
Comments
APAR Information
APAR number
PI87656
Reported component name
ENT COBOL FOR Z
Reported component ID
5655W3200
Reported release
520
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2017-09-20
Closed date
2017-09-23
Last modified date
2017-10-02
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Modules/Macros
IGYCINIT
Fix information
Fixed component name
ENT COBOL FOR Z
Fixed component ID
5655W3200
Applicable component levels
R520 PSY UI50557
UP17/09/28 P F709
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 2017