IBM Support

PI70078: SQLCODE=-502, ERROR: THE CURSOR IS ALREADY OPEN

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • User is performing Optim INSERT processing using a Column Map
    (CM).
    
    User has Optim Object Security enabled and the job owner's ID
    does not have authority to access the CM specified for the
    INSERT Table Map. Optim detects the lack of authority and aborts
    processing.
    However when it proceeds to create the processing report it
    attempts to process the CM again and reports the following
    error:
    
    IBM InfoSphere Optim System Error Structure - ErrCB
    
    ErrCB.ID=      ZZZERRCBZZ
    
    SysRel=        11.4.0
    
    DB2Rel=        1015(NFM)
    
    ErrCB.Type=    DB2 SQL ERROR
    
    ErrCB.AuxInfo= Select CM Open
    
    ErrCB.Code=    -502
    
     DSNT408I SQLCODE = -502, ERROR:  THE CURSOR IDENTIFIED IN AN
    OPEN
              STATEMENT IS ALREADY OPEN
    
     DSNT418I SQLSTATE   = 24502 SQLSTATE RETURN CODE
    
     DSNT415I SQLERRP    = DSNXERT SQL PROCEDURE DETECTING ERROR
    
     DSNT416I SQLERRD    = -300  0  0  -1  0  0 SQL DIAGNOSTIC
    INFORMATION
     DSNT416I SQLERRD    = X'FFFFFED4'  X'00000000'  X'00000000'
    
              X'FFFFFFFF'  X'00000000'  X'00000000' SQL DIAGNOSTIC
    
              INFORMATION
    
    Number of Function Entries=  7
    
      ErrCB.N(0).Src=     FOPQMDAA 20161003 GC70840D
    
      ErrCB.N(0).Func=    (000421) DSGetCM
    
      ErrCB.N(1).Src=     FOPJINI  20160923 S00138DD
    
      ErrCB.N(1).Func=    (002279) WriteColMap
    
      ErrCB.N(2).Src=     FOPJINI  20160923 S00138DD
    
      ErrCB.N(2).Func=    (001710) BuildDetailReport
    
      ErrCB.N(3).Src=     FOPJINS  20160912 S00138AD
    
      ErrCB.N(3).Func=    (005004) BuildInsertReport
    
      ErrCB.N(4).Src=     FOPUREST 20160923 S00138DD
    
      ErrCB.N(4).Func=    (005394) InsertStatement
    
      ErrCB.N(5).Src=     FOPUMAIN 20160912 S00138AD
    
      ErrCB.N(5).Func=    (000814) FOPMMUTL_dynamn
    
      ErrCB.N(6).Src=     FOPMMAIN 20160930 GC70840D
    
      ErrCB.N(6).Func=    (000994) Main
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * Optim for z/OS users utilizing Optim Object Security.        *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * User is performing Optim INSERT processing using a Column    *
    * Map                                                          *
    * (CM).                                                        *
    *                                                              *
    * User has Optim Object Security enabled and the job owner's   *
    * ID                                                           *
    * does not have authority to access the CM specified for the   *
    * INSERT Table Map. Optim detects the lack of authority and    *
    * aborts                                                       *
    * processing.                                                  *
    * However when it proceeds to create the processing report it  *
    * attempts to process the CM again and reports the following   *
    * error:                                                       *
    *                                                              *
    * IBM InfoSphere Optim System Error Structure - ErrCB          *
    *                                                              *
    * ErrCB.ID=      ZZZERRCBZZ                                    *
    * SysRel=        11.4.0                                        *
    * DB2Rel=        1015(NFM)                                     *
    * ErrCB.Type=    DB2 SQL ERROR                                 *
    * ErrCB.AuxInfo= Select CM Open                                *
    * ErrCB.Code=    -502                                          *
    * DSNT408I SQLCODE = -502, ERROR:  THE CURSOR IDENTIFIED IN AN *
    * OPEN STATEMENT IS ALREADY OPEN                               *
    * DSNT418I SQLSTATE   = 24502 SQLSTATE RETURN CODE             *
    * DSNT415I SQLERRP    = DSNXERT SQL PROCEDURE DETECTING ERROR  *
    * DSNT416I SQLERRD    = -300  0  0  -1  0  0 SQL DIAGNOSTIC    *
    * INFORMATION                                                  *
    * DSNT416I SQLERRD    = X'FFFFFED4'  X'00000000'  X'00000000'  *
    *           X'FFFFFFFF'  X'00000000'  X'00000000' SQL          *
    * DIAGNOSTIC                                                   *
    *           INFORMATION                                        *
    * Number of Function Entries=  7                               *
    *   ErrCB.N(0).Src=     FOPQMDAA 20161003 GC70840D             *
    *   ErrCB.N(0).Func=    (000421) DSGetCM                       *
    *   ErrCB.N(1).Src=     FOPJINI  20160923 S00138DD             *
    *   ErrCB.N(1).Func=    (002279) WriteColMap                   *
    *   ErrCB.N(2).Src=     FOPJINI  20160923 S00138DD             *
    *   ErrCB.N(2).Func=    (001710) BuildDetailReport             *
    *   ErrCB.N(3).Src=     FOPJINS  20160912 S00138AD             *
    *   ErrCB.N(3).Func=    (005004) BuildInsertReport             *
    *   ErrCB.N(4).Src=     FOPUREST 20160923 S00138DD             *
    *   ErrCB.N(4).Func=    (005394) InsertStatement               *
    *   ErrCB.N(5).Src=     FOPUMAIN 20160912 S00138AD             *
    *   ErrCB.N(5).Func=    (000814) FOPMMUTL_dynamn               *
    *   ErrCB.N(6).Src=     FOPMMAIN 20160930 GC70840D             *
    *   ErrCB.N(6).Func=    (000994) Main                          *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Apply the provided fix.                                      *
    ****************************************************************
    The failure is triggered by the Object Security exit returning
    "not authorized" for the user. Subsequent processing does not
    clean up a cursor opened for Column Map retrieval.
    

Problem conclusion

  • The processing will be corrected to perform cursor cleanup after
    receiving authorization failure for an object.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI70078

  • Reported component name

    OPTIM MOVE FOR

  • Reported component ID

    5655V0700

  • Reported release

    B30

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2016-10-03

  • Closed date

    2016-10-19

  • Last modified date

    2016-11-02

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

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

Modules/Macros

  • FOPMMJBS FOPCFPMN FOPMCOLP FOPMMCMR FOP9APIM FOPMAIN  FOPHSTM
    FOPOMN   FOPMMUTL FOPCXLIB FOPMCOLA FOPMCMAI FOPMECMN
    

Fix information

  • Fixed component name

    OPTIM MOVE FOR

  • Fixed component ID

    5655V0700

Applicable component levels

  • RB30 PSY UI41867

       UP16/10/24 P F610

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":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SG19M","label":"APARs - z\/OS environment"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"B30","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
02 November 2016