Page 1 of 1

The cursor specified in a FETCH or CLOSE statement

Posted: Fri Jun 20, 2003 2:52 am
by EBergman
Hi There,
I've been running a job for a few months - successfully. Nothing changed on my job.
I'm now getting the following error when running this same job:

"[IBM][CLI Driver][AS] SQL0501N The cursor specified in a FETCH or CLOSE statement is not open. SQLSTATE=24501"

The job currently only extracts 300 rows from 2 DB2 Databases, and then aborts.
The IBM documentation doesn't help, and I'm still not sure what to do to fix this error.

Posted: Fri Jun 20, 2003 5:32 pm
by ray.wurlod
The first thing to check is your assertion that nothing has changed. For example, assuming connection information is parameterized, have the default values changed? Has the connection requirement to DB2 changed? Have you established - proven - that nothing has changed in the DB2 environment?
There are lots of reasons you might get a "cursor not open" message, ultimately they all boil down to the same thing. Can you, using some other client, access the same tables? Can you create a test job in DataStage to access the same tables? If so, what's different about the failing job?

Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518