IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

-514 while querying through EZT


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
esther_ebe

New User


Joined: 21 Jan 2010
Posts: 2
Location: India

PostPosted: Tue Oct 26, 2010 12:49 pm
Reply with quote

Hi,

I am using a SELECT query in EZT. While running the job in Test region, the job runs fine and generates output. But on running the job in regions other than the test, the job abends with -514.
Please see the abend details below.

SQLCODE -514


Cursor 'C07' has never been prepared or was invalidated by a COMMIT or
ROLLBACK (or the equivalent).

Corrective action:

Ensure that you prepare the statement that is named in the DECLARE
CURSOR statement before opening the cursor. Do not issue COMMIT or
ROLLBACK until after you are finished using the cursor, or prepare the
statement again after the COMMIT or ROLLBACK.

But I am using only a SELECT query.
please find the query used in the EZT.
SELECT DATE
FROM TABLE
WHERE DATE IS NOT NULL
ORDER BY DATE DESC
FETCH FIRST ROW ONLY

Please advise
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Oct 26, 2010 7:32 pm
Reply with quote

Hello and welcome to the forum,

Suggest you speak with your database support.

From what has been posted, it sounds like there is an improper setup for the new environment.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts DB2 Statistics - Using EXPLAIN and qu... DB2 1
No new posts Need Help in Querying DB2 9
No new posts DB2 abend while querying - SQLCODE=-9... DB2 4
No new posts Querying two flat files on common key... Mainframe Interview Questions 3
Search our Forums:

Back to Top