A fix is available
APAR status
Closed as program error.
Error description
When performing calculations of R ** S, a base number raised to a fractional power, behavior is different between using ARITH(EXTEND) and ARITH(COMPAT) in certain cases: - Zero raised to zero power >> Without SIZE ERROR clause, the value returned is 1, and a message is issued. However, with ARITH(EXTEND), result is CEE2020E. - A negative number raised to a fractional power >> Without SIZE ERROR, the absolute value of the base is used, and a message is issued. With ARITH(EXTEND), result is CEE2006E.
Local fix
Compile with ARITH(COMPAT), or use ON SIZE ERROR phrase
Problem summary
**************************************************************** * USERS AFFECTED: Users of Enterprise COBOL 6.3 and later * * releases running AMODE 64 programs compiled * * with ARITH(EXTEND) that perform * * exponentiation calculations with * * COMP-2 data types. * **************************************************************** * PROBLEM DESCRIPTION: When the On Size Error clause is not * * defined, results from exponentiation * * calculations for AMODE 64 programs * * compiled with ARITH(EXTEND) behave * * differently from AMODE 64 programs * * compiled with ARITH(COMPAT) by * * producing LE error messages in cases * * where COBOL Runtime warning or error * * messages are expected. * **************************************************************** * RECOMMENDATION: Install the provided PTF. * **************************************************************** There was a logic error in the COBOL Runtime routine for performing exponentiation calculations using COMP-2 in three cases. When exponentiation calculations were performed using COMP-2 without ON SIZE ERROR, the exponentiation behaviour differed between ARITH(COMPAT) and ARITH(EXTEND) in 3 cases. Case 1 - Base = negative, Power = fractional (eg: 1.24) Case 2 - Base = zero, Power = zero Case 3 - Base = zero, Power = negative In the cases listed above, LE error messages were incorrectly generated causing the program to end. The correct behavior is that the following Run-time messages are generated for these cases: Case 1 - IGZ0048W Case 2 - IGZ0049W Case 3 - IGZ0050S COB0603T/K COB0604T/K
Problem conclusion
The problem in the COBOL Runtime has been corrected. The problem was resolved by improving the logic used to perform exponentiation calculates. Now Run-time messages will be printed in these three cases: Case 1 - Base = negative, Power = fractional (eg: 1.24) Case 2 - Base = zero, Power = zero Case 3 - Base = zero, Power = negative This would ensure that ARITH(COMPAT) and ARITH(EXTEND) both have the same behavior when performing exponentiation calculation with COMP-2 and without On Size Error.
Temporary fix
Comments
APAR Information
APAR number
PH53914
Reported component name
LE ENT COBOL LI
Reported component ID
568819812
Reported release
7D0
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2023-04-13
Closed date
2023-06-19
Last modified date
2023-07-03
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Modules/Macros
CELQSG04 CELQV004 IGZQAPI IGZQCA64 IGZQCDA IGZQINPL IGZQJNI2
Fix information
Fixed component name
LE ENT COBOL LI
Fixed component ID
568819812
Applicable component levels
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":"BU011","label":"Systems - zSystems software"},"Product":{"code":"SG19M","label":"Enterprise COBOL for z\/OS"},"Platform":[{"code":"PF054","label":"z Systems"}],"Version":"7D0"}]
Document Information
Modified date:
03 July 2023