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.
Cursor 'C07' has never been prepared or was invalidated by a COMMIT or
ROLLBACK (or the equivalent).
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.
WHERE DATE IS NOT NULL
ORDER BY DATE DESC
FETCH FIRST ROW ONLY