IBM Support

PK42478: ALC TO ADD FOREIGN KEY CREATED INCORROUT DROP FOREIGN KEY STM STATEMENT WSL GETS SQLCODEN104 SQLCODE -104

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Using DB2 Admin Tool with ALC to addfk ( add foreign key ) the
    process creates a bad drop of the foreign key. Example:
    
      ALTER TABLE ""."" DROP FOREIGN KEY ;  <-----------bad -----
      ALTER TABLE LUCYK.TB71534B  FOREIGN KEY  DEPTNO
        (" WORKDEPT")
        REFERENCES LUCYK.TB71534A
        ON DELETE RESTRICT;
    This then causes rc=8 error when WSL is run:
       ALTER TABLE ""."" DROP FOREIGN KEY;
    SQLERROR ON ALTER      COMMAND, PREPARE    FUNCTION
     DSNT408I SQLCODE = -104, ERROR:  ILLEGAL SYMBOL """". SOME
    SYMBOLS THAT MIGHT
              BE LEGAL ARE: <IDENTIFIER>
     DSNT418I SQLSTATE   = 42601 SQLSTATE RETURN CODE
     DSNT415I SQLERRP    = DSNHSMUD SQL PROCEDURE DETECTING ERROR
     DSNT416I SQLERRD    = 502  0  0  -1  16  0 SQL DIAGNOSTIC
    INFORMATION
     DSNT416I SQLERRD    = X'000001F6'  X'00000000'  X'00000000'
    sqlcoden104 slqcode104 sqlcode -104
    

Local fix

  • Please apply PTF when available.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: ALC users using the ADDFK function when no   *
    *                 previous FK exists.                          *
    ****************************************************************
    * PROBLEM DESCRIPTION: ADDFK  (Add  Foreign  Key)  created an  *
    *                      incorrect and unnecessary DROP FOREIGN  *
    *                      KEY.                                    *
    ****************************************************************
    * RECOMMENDATION: Apply The PTF.                               *
    ****************************************************************
    Modified ADB27A.EXEC to suppress DROPFK during ADDFK when not
    needed.
    

Problem conclusion

  • The problems have been fixed.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PK42478

  • Reported component name

    DB2 ADMIN TOOL

  • Reported component ID

    568851500

  • Reported release

    710

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2007-04-02

  • Closed date

    2007-10-11

  • Last modified date

    2007-11-02

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

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

Modules/Macros

  •    ADB27A
    

Fix information

  • Fixed component name

    DB2 ADMIN TOOL

  • Fixed component ID

    568851500

Applicable component levels

  • R710 PSY UK30219

       UP07/10/25 P F710

  • R720 PSY UK30220

       UP07/10/25 P F710

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.

[{"Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSZJXP","label":"DB2 Tools for z\/OS"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"710"}]

Document Information

Modified date:
30 March 2021