IBM Support

PH61022: STRING WITH POINTER STATEMENT POINTS TO A WRONG POSITION WITH UTF-8 DATA ITEMS

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • STRING WITH POINTER statement points to a wrong position with
    UTF-8 data items
    

Local fix

  • N/A
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: Users of Enterprise COBOL 5 and later        *
    *                 releases running 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.     *
    *                                                              *
    *                      NEW FUNCTION.                           *
    ****************************************************************
    * 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
    
    COB0501T/K COB0502T/K COB0601T/K COB0602T/K 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

    PH61022

  • 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-04-22

  • 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:

    UI97350 UI97351 UI97352

Modules/Macros

  • IGZCEV4  IGZCJNI2 IGZLLIBV IGZXAPI  IGZXCA31 IGZXCDA  IGZXD24
    IGZXDMR  IGZXJNI2 IGZXLPIO IGZXLPKA IGZXLPKB IGZXLPKC IGZXLPKD
    IGZXLPKE IGZXLPKF IGZXLPKG IGZXPK2
    

Fix information

  • Fixed component name

    LE ENT COBOL LI

  • Fixed component ID

    568819812

Applicable component levels

  • R7C0 PSY UI97350

       UP24/06/27 P F406

  • R7D0 PSY UI97351

       UP24/06/27 P F406

  • R7E0 PSY UI97352

       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