The cursor specified in a FETCH or CLOSE statement

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
EBergman
Participant
Posts: 5
Joined: Mon Jul 15, 2002 7:16 am
Location: South Africa

The cursor specified in a FETCH or CLOSE statement

Post 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.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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
Post Reply