Topic
3 replies Latest Post - ‏2012-12-13T06:29:21Z by Greenspan
Greenspan
Greenspan
23 Posts
ACCEPTED ANSWER

Pinned topic DB2 Access issue -501

‏2012-08-07T10:50:59Z |
Hi,

We are useg WTX on zOS with 2 input cards and 2 output cards. Both thye input cards' input are database. output of one card is database and the other is sink. The map is facing issues with sql code -501. The log is as below

Validating the adapter command...
Database type is DB2
Connection from pool is being reused.
Interface library version 8.2(183)
Map: MAPLIB(TESTGREF), Timestamp: .
Data being retrieved for input card 2.
Database adapter: DB2 SQL adapter for MVS Version 8.2(183)
Starting a database unload...
Query : SELECT Col1 ,Col2 ,Col3,Col4,Col5,Col6 FROM XXXXXXX.Tablename
Col0 = 'XYY14289' AND Col11 = '3' AND Stat = ' ' FETCH FIRST ROW ONLY WITH UR
Query size : 359
Context: Input Card, Transaction scope: Card
On Failure: Rollback, On Success: Keep
TRACE command specified, file: DD:MERCLOG
DBS_ExecuteStmtDirect: EXEC SQL PREPARE Q(0-7) FROM :sqlst
SELECT Col1 ,Col2 ,Col3,Col4,Col5,Col6 FROM XXXXXXX.Tablename
Col0 = 'ABC14289' AND Col11 = '3' AND Stat = ' ' FETCH FIRST ROW ONLY WITH UR
DBS_ExecuteStmtDirect: EXEC SQL EXECUTE Q(0-7)
DBS_ExecuteStmtDirect: execute failed
0 DSNT408I SQLCODE = -501, ERROR: THE CURSOR IDENTIFIED IN A FETCH OR CLOSE STATEMENT IS NOT OPEN
LCODE = -501, ERROR: THE CURSOR IDENTIFIED IN A FETCH OR CLOSE STATEMENT IS NOT OPEN
0 DSNT418I SQLSTATE = 24501 SQLSTATE RETURN CODE
LSTATE = 24501 SQLSTATE RETURN CODE
0 DSNT415I SQLERRP = DSNXERT SQL PROCEDURE DETECTING ERROR
LERRP = DSNXERT SQL PROCEDURE DETECTING ERROR
0 DSNT416I SQLERRD = -240 0 0 -1 0 0 SQL DIAGNOSTIC INFORMATION
LERRD = -240 0 0 -1 0 0 SQL DIAGNOSTIC INFORMATION
0 DSNT416I SQLERRD = X'FFFFFF10' X'00000000' X'00000000' X'FFFFFFFF' X'00
LERRD = X'FFFFFF10' X'00000000' X'00000000' X'FFFFFFFF' X'00000000' X'0
0 INFORMATION
FORMATION
0

0

Rolling back the transaction since -CCARD, -CSTMT or Card scope was specified

Anyone has seen this kind of issue ?
Updated on 2012-12-13T06:29:21Z at 2012-12-13T06:29:21Z by Greenspan
  • jvanboga
    jvanboga
    416 Posts
    ACCEPTED ANSWER

    Re: DB2 Access issue -501

    ‏2012-08-09T20:15:45Z  in response to Greenspan
    "THE CURSOR IDENTIFIED IN A FETCH OR CLOSE STATEMENT IS NOT OPEN"

    This sounds less like a WTX issue and related more to the state of the DB or VSAM file.... but I'm not an expert on zOS at all.
    • Greenspan
      Greenspan
      23 Posts
      ACCEPTED ANSWER

      Re: DB2 Access issue -501

      ‏2012-08-23T12:08:38Z  in response to jvanboga
      The cursors are opened by the adaptper irrespective of the sql statements. So it would not that be an WTX adapter failure?
      • Greenspan
        Greenspan
        23 Posts
        ACCEPTED ANSWER

        Re: DB2 Access issue -501

        ‏2012-12-13T06:29:21Z  in response to Greenspan
        This turned out to be compatibility issue between some environment upgrade and WTX 8.1 . There is no workaround except upgrade to 8.4.