I have a DB2 plugin stage that select from a table which join to a view. Theres no error when validate. But it get aborted after extracting 1500 records.
Here's the error:
JobGetClientNum01..Transformer_16: SQLExtendedFetch: Error retrieving results from server.
JobGetClientNum01..Transformer_16: [IBM][CLI Driver][AS] SQL0501N The cursor specified in a FETCH or CLOSE statement is not open. SQLSTATE=24501
Anyone know how to solve this?
DB2 SQL error
Moderators: chulett, rschirm, roy
Code: Select all
SQL0501N The cursor specified in a FETCH or CLOSE statement is not open.
Explanation: The program attempted to either: (1) FETCH using a cursor, or (2) CLOSE a cursor at a time when the specified cursor was not open.
The statement cannot be processed.
User Response: Check for a previous message (SQLCODE) that may have closed the cursor. Note that after the cursor is closed, any fetches or close cursor statements receive SQLCODE -501.
If no previous SQLCODEs have been issued, correct the application program to ensure that the cursor is open when the FETCH or CLOSE statement is executed.
Finally Solve!!!
Tq all for replying but I had finally found the solution. :D
Now I enter onli 1 table name into the "Table names:" field of the DB2 plug-in stage, it can run successfully.So whenever I need to join 2 or more table I would need to use user defined SQL as the generated SQL cant have more than 1 table. So this counld be a bug in the DB2 plugin stage as I see it.
Now I enter onli 1 table name into the "Table names:" field of the DB2 plug-in stage, it can run successfully.So whenever I need to join 2 or more table I would need to use user defined SQL as the generated SQL cant have more than 1 table. So this counld be a bug in the DB2 plugin stage as I see it.
Re: Finally Solve!!!
Or maybe the functionality is not really what you expect... I doubt Ascential would see this as a bug.
"Working with DataStage is most of the time working to get around DataStage quirks"
Ogmios
"Working with DataStage is most of the time working to get around DataStage quirks"
Ogmios