IBM Support

PH71340: WHEN THE DB2 COPROCESSOR IS USED AND AN SQL STATEMENT IS NOT TERMINATED WITH AN END-EXEC THE COMPILER SHOULD ISSUE A DIAG-MSG

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When the DB2 coprocessor is used and an SQL code block is not
    terminated with an END-EXEC, the compiler finds 0 PROCEDURE
    DIVISION statements to compile and ends with an RC=4.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED: Users of Enterprise COBOL V6.4 compiling     *
    *                 Db2 programs where there is no matching      *
    *                 END-EXEC for an EXEC SQL statement.          *
    ****************************************************************
    * PROBLEM DESCRIPTION: The compiler just kept reading through  *
    *                      the whole source program looking for    *
    *                      END=EXEC. The the compiler gave a bad   *
    *                      message about compiler finds 0          *
    *                      PROCEDURE DIVISION statements to        *
    *                      compile and ends with RC=4.             *
    ****************************************************************
    * RECOMMENDATION: Apply the provided PTF.                      *
    ****************************************************************
    The compiler was not parsing COBOL while searching for the
    END-EXEC. The coprocessor just passes everything from EXEC SQL
    through END-EXEC to the Db2 precompiler services.
    

Problem conclusion

  • The compiler was changed to stop looking for END-EXEC at EOF
    of the input source, or when EXEC SQL is found, indicating a
    new SQL statement. Then the compiler can put out a helpful
    message about missing END-EXEC with the line number of the
    

Temporary fix

Comments

APAR Information

  • APAR number

    PH71340

  • Reported component name

    ENT COBOL FOR Z

  • Reported component ID

    5655EC600

  • Reported release

    650

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2026-05-14

  • Closed date

    2026-05-14

  • Last modified date

    2026-06-01

  • APAR is sysrouted FROM one or more of the following:

    PH69785

  • 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 IGYCJGEN IGYCLIBR IGYCLSTR IGYCLVL0 IGYCLVL1
    IGYCLVL2 IGYCLVL3 IGYCLVL8 IGYCMALL IGYCOB2  IGYCOB2E IGYCOPI
    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

  • R650 PSY UO07832

       UP26/05/22 P F605

  • R651 PSY UO07833

       UP26/05/22 P F605

  • R652 PSY UO07834

       UP26/05/22 P F605

  • R65H PSY UO07835

       UP26/05/22 P F605

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":"6.5","Line of Business":{"code":"LOB70","label":"Z TPS"}}]

Document Information

Modified date:
01 June 2026