IBM Support

PH68342: ISSUES WITH CALLING A 31-BIT COBOL PROGRAM FROM A 64-BIT COBOL PROGRAM ON USS

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When a 64-bit COBOL program calls a 31-bit COBOL program, the
    64-bit COBOL fails with the abend as shown below:
    
    $cat COBMAIN1.cbl
          IDENTIFICATION DIVISION.
            PROGRAM-ID. COBMAIN1.
         *
          ENVIRONMENT DIVISION.
         *
          DATA DIVISION.
          WORKING-STORAGE SECTION.
            01  WS-PROG  PIC X(8) VALUE "SUBPROGM".
            >>IF IGY-LP = 64
            >>DATA 31
            >>END-IF
            01  WS-GROUP.
              03  WS-AMT   PIC S9(7)V9(3)   comp-3 VALUE 1234567.0.
         *
          PROCEDURE DIVISION.
          0100-MAIN.
              MOVE  100.00 TO WS-AMT.
              DISPLAY "IN COBMAIN CALLING " WS-PROG.
              CALL  WS-PROG USING WS-AMT.
              DISPLAY "BACK IN MAIN".
              DISPLAY "IN COBMAIN after " WS-PROG
                      " WS-AMT=" WS-AMT.
              GOBACK.
          0800-INIT.
                EXIT.
    $ cat SUBPROGM.cbl
          IDENTIFICATION DIVISION.
            PROGRAM-ID. SUBPROGM.
         *
          ENVIRONMENT DIVISION.
         *
          DATA DIVISION.
          WORKING-STORAGE SECTION.
            01  WS-SIG  PIC X(16) VALUE "=== SUBPROGM ===".
            >>IF IGY-LP = 64
            >>DATA 31
            >>END-IF
            01  WS-COUNT   PIC 9(8) COMP-5 VALUE 1.
         *
          LINKAGE SECTION.
            01  LK-AMT     PIC S9(7)V9(3) COMP-3.
         *
          PROCEDURE DIVISION USING LK-AMT.
          0100-PROG.
              DISPLAY "IN SUBPROGM LK-AMT=" LK-AMT.
              ADD  1   TO  WS-COUNT.
              DISPLAY "AFTER ADD".
              COMPUTE  LK-AMT = LK-AMT * WS-COUNT.
              DISPLAY "AFTER COMPUTE".
              GOBACK.
          0800-END.
                EXIT.
    $
    
    $ export _IGZ_RUNOPTS="AMODE3164"
    $ export STEPLIB=HLQ.EXE:HLQ.SIGYCOMP:HLQ.SCEERUN:HLQ.SCEERUN2
    $ cob2 -q64 -o COBMAIN1 COBMAIN1.cbl -bdll
    PP 5655-EC6 IBM Enterprise COBOL for z/OS 6.4.0 in progress ...
    End of compilation 1, program COBMAIN1, no statements flagged.
    $ cob2 -q32 -o SUBPROGM SUBPROGM.cbl  -bDLL
    PP 5655-EC6 IBM Enterprise COBOL for z/OS 6.4.0 in progress ...
    End of compilation 1, program SUBPROGM, no statements flagged.
    $ cp SUBPROGM "//'HLQ.EXE(SUBPROGM)'"
    $./COBMAIN1
    IN COBMAIN CALLING SUBPROGM
    IN SUBPROGM LK-AMT=0000100000
    AFTER ADD
    AFTER COMPUTE
    IDI0001I Fault Analyzer V14R1M5 (UI59890 2018/11/22) invoked by
    IDIXDCAP using SYS1.LOCAL.PARMLIB(IDICNF00)
    IDI0002I Module CELQLIB offset X'50B206': Abend S0C4-X'4'
    (Protection Exception)
    IDI0003I Fault ID F71337 assigned in history file IDI.HIST
    [1] + Done(137) ./COBMAIN1
    67112041 Killed ./COBMAIN1
    $
    

Local fix

  • N/A
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: Users of Enterprise COBOL 6.3 and later      *
    *                 releases running AMODE 64 COBOL programs     *
    *                 which call AMODE 31 DLL COBOL programs in    *
    *                 the z/OS UNIX file system.                   *
    ****************************************************************
    * PROBLEM DESCRIPTION: A call from an AMODE 64 COBOL program   *
    *                      to an AMODE 31 DLL COBOL program        *
    *                      appears to be successful, but an abend  *
    *                      (CEE3204S) occurs in module CELQLIB     *
    *                      when the called program returns to      *
    *                      the caller.                             *
    *                                                              *
    *                      Attention: IBM support                  *
    *                      When a system dump is captured and      *
    *                      analyzed using IPCS VERBX LEDATA, the   *
    *                      abending instruction is as follows:     *
    *                                                              *
    *                      D23F 8000 4904 MVC 0(64,R8),2308(R4)    *
    ****************************************************************
    * RECOMMENDATION: Install the provided PTF.                    *
    ****************************************************************
    The COBOL Runtime calls the AMODE 31 callee program through
    the Language Environment interface, CEL4RO31. The interface
    requires the AMODE 31 callee program to save and restore 64-bit
    registers, however the COBOL Runtime does not conform to
    this convention.
    
    As a result, at the time of the abend, the address in
    register 4 (Anchor DSA) should contain a valid 64-bit
    address, however the high-order 31bits (bits 0-31) are
    zeroed.
    
    The correct 'Anchor DSA Address' can be found in the
    'Crossing AMODE information' section when the captured dump is
    analyzed using IPCS.
    
    COB0603T/K COB0604T/K COB0605T/K
    

Problem conclusion

  • The COBOL Runtime has been corrected. The affected register
    is saved and restored correctly.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PH68342

  • Reported component name

    LE ENT COBOL LI

  • Reported component ID

    568819812

  • Reported release

    7F0

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2025-09-30

  • Closed date

    2025-10-22

  • Last modified date

    2025-11-03

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

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

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

  • R7D0 PSY UO05464

       UP25/11/01 P F510

  • R7E0 PSY UO05465

       UP25/11/01 P F510

  • R7F0 PSY UO05468

       UP25/11/01 P F510

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

Document Information

Modified date:
03 November 2025