Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

-514 while querying through EZT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
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    Post subject: -514 while querying through EZT
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

Site Director


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

PostPosted: Tue Oct 26, 2010 7:32 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Need Help in Querying nivastech DB2 9 Wed Aug 11, 2010 1:22 pm
No new posts DB2 abend while querying - SQLCODE=-9... krishnapriyavr DB2 4 Wed Jul 14, 2010 1:14 pm
No new posts Querying two flat files on common key... ganeshptrk Mainframe Interview Questions 3 Sun Jun 24, 2007 2:32 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us