Temporary table issue on mainframe Db2

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Suchay
    New Member
    • Apr 2010
    • 1

    #1

    Temporary table issue on mainframe Db2

    I am having an issue with the temporary tables. My stored procedure has
    two temp tables,the stored procedure is invoked by Java. When we call
    the Storedprocedure for one instance it works fine,when the the stored
    procedure is invoked by two different people at the same time it does't
    provide the resultset properly,the result set with less data closes and
    provide less values,it is picking up the same cursor values for the two
    calls.

    We tried creating runtime names for the temp tables and tested,there
    was no change. Please advise.

    Temp table dec

    Code:
    DECLARE GLOBAL TEMPORARY TABLE WV-TEMPLOC 
    ( 
    CONCERN_ID CHAR(12) NOT NULL 
    ,CONCERN_STATUS_CD CHAR(8) NOT NULL 
    ,CONCERN_TITLE_TX CHAR(50) NOT NULL 
    ,CONCERN_DESC_TX_ VARCHAR(250) NOT NULL 
    ,NO_OF_DAYS_OPEN SMALLINT 
    ,SEVERITY_RATING CHAR(3) NOT NULL 
    ,OPEN_DT CHAR(10) NOT NULL 
    ,MONITOR_DT CHAR(10) NOT NULL 
    ,CLOSE_DT CHAR(10) NOT NULL 
    ,ATTACH_DESC VARCHAR(620) NOT NULL 
    ,RES_DES_CODE VARCHAR(820) NOT NULL 
    ,CONCERN_STATUS_SUMMARY VARCHAR(250) NOT NULL 
    ,R1000_CNT VARCHAR(500) NOT NULL 
    ,R1000_TOTAL DECIMAL(9, 4) NOT NULL 
    ,CPU_CNT VARCHAR(500) NOT NULL 
    ,CPU_TOTAL DECIMAL(9, 4) NOT NULL 
    ,IQS_CNT VARCHAR(500) NOT NULL 
    ,IQS_TOTAL DECIMAL(9, 4) NOT NULL 
    ,EMQF_CNT VARCHAR(500) NOT NULL 
    ,EMQF_TOTAL DECIMAL(9, 4) NOT NULL 
    ,GQRS_CNT VARCHAR(500) NOT NULL 
    ,GQRS_TOTAL DECIMAL(9, 4) NOT NULL 
    ,SAQ_SCORE DECIMAL(9, 4) NOT NULL 
    ) 
    ON COMMIT PRESERVE ROWS 
    
    DECLARE GLOBAL TEMPORARY TABLE WV-TEMPLOC1 
    ( 
    CONCERN_ID CHAR(12) NOT NULL 
    ,SEVERITY_RATING CHAR(3) NOT NULL 
    ) 
    ON COMMIT PRESERVE ROWS
Working...