A fix is available
APAR status
Closed as program error.
Error description
To avoid some address recalculation for variably located items, the generated code caches OCCURS DEPENDING ON (ODO) item value(s) in ODOsv_cell(s); if the ODO item value(s) are unchanged at the point of access, the base locator for the variably located item (BLV) can be used as is, otherwise it needs to be recalculated. The ODOsv_cell's are supposed to be initially set to -1, so on the first reference to a variably located item, the BLV can be calculated for the first time. However, only with the COBOL 6.3 compiler at OPT(2), the compiler uses the wrong offset for the block of ODOsv_cell's and initializes some other area of memory, leaving the block of ODOsv_cell's zero, or containing some residual values. This can result in an 0C4 because * A BLV cell is never properly calculated. Updating the associated variably located item results in an invalid memory reference. * Depending on where the compile unit's stack frame is within a stack segment, the ODOsv_cell block initialization may write to unmapped memory.
Local fix
Compile at OPT(1).
Problem summary
**************************************************************** * USERS AFFECTED: Users of Enterprise COBOL 6.3 compiling * * programs at OPT(1|2) that contain OCCURS 0 * * TO N TIMES DEPENDING ON X where the OCCURS * * DEPENDING ON data item is first accessed * * when the OCCURS DEPENDING ON object is 0. * **************************************************************** * PROBLEM DESCRIPTION: Trying to access the OCCURS DEPENDING * * ON data item accesses an invalid * * memory address, leading to the wrong * * memory being accessed and possibly to * * the program abending with a S0C4. * **************************************************************** * RECOMMENDATION: Apply the provided PTF. * **************************************************************** For every OCCURS DEPENDING ON data item, the compiler generates code to compute the address of the data item based on the value of the ODO object. To avoid recalculating the address when the ODO object hasn't changed, the compiler saves the value of the ODO object in a compiler-generated data item called an ODOsv_cell, and the address itself in a BLV_cell. The compiler was incorrectly initializing the ODOsv_cells. When an ODO address computation was needed, the uninitialized ODOsv_cells contained zero, and if the value of the ODO object at that time was also zero, the compiler skipped the address computation, using the value in the BLV_cell for the address. However, since the value in the BLV_cell was never computed, it was incorrect, and using it caused the generated code to access the wrong memory.
Problem conclusion
The compiler was fixed to properly initialize the ODOsv_cells, causing the addresses in BLV_cells to be computed the first time they were needed even if the values of the ODO objects were zero.
Temporary fix
Comments
APAR Information
APAR number
PH31333
Reported component name
ENT COBOL FOR Z
Reported component ID
5655EC600
Reported release
630
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2020-11-05
Closed date
2020-11-23
Last modified date
2020-12-01
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Modules/Macros
IGY8RWTU IGYCASMB IGYCCBE IGYCCCRT IGYCCICS IGYCCSRV IGYCDGEN IGYCDIAG IGYCDMAP IGYCEN$0 IGYCEN$1 IGYCEN$2 IGYCEN$3 IGYCEN$4 IGYCEN$5 IGYCEN$8 IGYCEN$D IGYCEN$R IGYCFGEN IGYCFREE IGYCINIT IGYCJA$0 IGYCJA$1 IGYCJA$2 IGYCJA$3 IGYCJA$4 IGYCJA$5 IGYCJA$8 IGYCJA$D IGYCJA$R IGYCLIBR IGYCLSTR IGYCLVL0 IGYCLVL1 IGYCLVL2 IGYCLVL3 IGYCLVL8 IGYCMALL IGYCOSCN IGYCPGEN IGYCRCTL IGYCRDPR IGYCRDSC IGYCREAL IGYCRWT IGYCSCAN IGYCSIMD IGYCUE$0 IGYCUE$1 IGYCUE$2 IGYCUE$3 IGYCUE$4 IGYCUE$5 IGYCUE$8 IGYCUE$D IGYCUE$R IGYCXREF IGYDRV IGYEQCWI IGYMSGE IGYMSGK IGYMSGT IGYMSGXT IGYQCBE IGYQSPLT IGYZQEN6 IGYZQENU IGYZQJP6 IGYZQJPN
Fix information
Fixed component name
ENT COBOL FOR Z
Fixed component ID
5655EC600
Applicable component levels
R630 PSY UI72712
UP20/11/28 P F011
R631 PSY UI72713
UP20/11/28 P F011
R632 PSY UI72714
UP20/11/28 P F011
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"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"630","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]
Document Information
Modified date:
12 December 2023