A fix is available
APAR status
Closed as program error.
Error description
COBOL Runtime failed to detect the OVERFLOW condition when UTF-8 items on the STRING statement with the POINTER phrase and the ON OVERFLOW/NOT ON OVERFLOW phrases. This resulted in the ON OVERFLOW phrase not being executed and an incorrect pointer value being set when overflow occurred. For example, given the following COBOL program, ... 01 PTR PIC 9(4). 01 STR1 PIC U(5) VALUE U'ABCD~'. 01 STR2 PIC U(5) VALUE U'EFGH~'. 01 RECEIVER PIC U(5) VALUE U' '. ... MOVE 1 TO PTR. STRING STR1 DELIMITED BY U"~" STR2 DELIMITED BY U"~" INTO RECEIVER WITH POINTER PTR ON OVERFLOW DISPLAY "!!!OVERFLOW" NOT ON OVERFLOW DISPLAY "NO OVERFLOW" END-STRING. DISPLAY 'RECEIVER: ' FUNCTION DISPLAY-OF(RECEIVER) DISPLAY 'PTR: ' PTR ... The actual output produced(incorrect): NO OVERFLOW RECEIVER: ABCDE PTR: 0009 The correct output should be: !!!OVERFLOW RECEIVER: ABCDE PTR: 0006
Local fix
N/A
Problem summary
**************************************************************** * USERS AFFECTED: Users of Enterprise COBOL 6.3 and later * * releases running AMODE 64 COBOL * * programs which use UTF-8 items on the * * STRING statement with the POINTER * * phrase and the ON OVERFLOW/NOT ON * * OVERFLOW phrases. * **************************************************************** * PROBLEM DESCRIPTION: COBOL STRING statement with POINTER * * phrase sets sets an incorrect * * pointer value when OVERFLOW occurs. * **************************************************************** * RECOMMENDATION: Install the provided PTF. * **************************************************************** COBOL Runtime failed to detect the OVERFLOW condition when UTF-8 items on the STRING statement with the POINTER phrase and the ON OVERFLOW/NOT ON OVERFLOW phrases. This resulted in the ON OVERFLOW phrase not being executed and an incorrect pointer value being set when overflow occurred. For example, given the following COBOL program, ... 01 PTR PIC 9(4). 01 STR1 PIC U(5) VALUE U'ABCD~'. 01 STR2 PIC U(5) VALUE U'EFGH~'. 01 RECEIVER PIC U(5) VALUE U' '. ... MOVE 1 TO PTR. STRING STR1 DELIMITED BY U"~" STR2 DELIMITED BY U"~" INTO RECEIVER WITH POINTER PTR ON OVERFLOW DISPLAY "!!!OVERFLOW" NOT ON OVERFLOW DISPLAY "NO OVERFLOW" END-STRING. DISPLAY 'RECEIVER: ' FUNCTION DISPLAY-OF(RECEIVER) DISPLAY 'PTR: ' PTR ... The actual output produced(incorrect): NO OVERFLOW RECEIVER: ABCDE PTR: 0009 The correct output should be: !!!OVERFLOW RECEIVER: ABCDE PTR: 0006 COB0603T/K COB0604T/K
Problem conclusion
The COBOL Runtime has been corrected. Note that the COBOL compiler APAR PH61671 is also available to address other problems related to STRING statements with USAGE UTF-8 operands. Refer to APAR PH61671 for details.
Temporary fix
Comments
APAR Information
APAR number
PH61569
Reported component name
LE ENT COBOL LI
Reported component ID
568819812
Reported release
7E0
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2024-05-29
Closed date
2024-06-17
Last modified date
2024-07-01
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
UI97354 UI97355 UI97362
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
R7C0 PSY UI97354
UP24/06/27 P F406
R7D0 PSY UI97355
UP24/06/27 P F406
R7E0 PSY UI97362
UP24/06/27 P F406
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"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7E0","Line of Business":{"code":"LOB70","label":"Z TPS"}}]
Document Information
Modified date:
02 July 2024