IBM Support

IC76467: CREATE OR REPLACE PACKAGE BODY WITH CURSOR VARIABLE FAILS WITH SQL0601N

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as fixed if next.

Error description

  • CREATE OR REPLACE PACKAGE BODY may fail with SQL0601N if the
    body contains a cursor variable.  This will happen if the cursor
    variable already exists in the PL/SQL package.  For example:
    
      create or replace package pack1 as end
      DB20000I  The SQL command completed successfully.
    
      create or replace package body pack1 as
        cursor c1 is (select ibmreqd from sysibm.SYSDUMMY1); --
      end
      DB20000I  The SQL command completed successfully.
    
      create or replace package body pack1 as
        cursor c1 is (select ibmreqd from sysibm.SYSDUMMY1); --
      end
      SQL0601N  The name of the object to be created is identical to
      the existing name "SCHEMA.PACK1.C1" of type "VARIABLE".
      LINE NUMBER=3. SQLSTATE=42710
    
    This second CREATE OR REPLACE should succeed and replace the
    definition of the cursor variable PACK1.C1.
    

Local fix

  • Drop and recreate the PL/SQL package: DROP PACKAGE PACK1
    

Problem summary

  • The fix is provided in the v97fp5
    

Problem conclusion

Temporary fix

Comments

APAR Information

  • APAR number

    IC76467

  • Reported component name

    DB2 CONNECT

  • Reported component ID

    DB2CONNCT

  • Reported release

    970

  • Status

    CLOSED FIN

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2011-05-18

  • Closed date

    2011-12-12

  • Last modified date

    2011-12-12

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

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

Fix information

Applicable component levels

  • R970 PSY

       UP

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSEPGG","label":"DB2 for Linux, UNIX and Windows"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"9.7","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
12 December 2011