DSNH520I E csectname THE OPEN STATEMENT FOR CURSOR cursor-name IS INVALID BECAUSE THE CURSOR WAS DEFINED BY AN ALLOCATE CURSOR STATEMENT

Explanation

The cursor was not successfully declared, so it was assumed to be defined by an ALLOCATE CURSOR statement. A cursor defined by an ALLOCATE CURSOR statement is open after successful completion of the statement. Attempting to OPEN an allocated cursor is an error.

System action

The statement cannot be executed.

User response

Add or fix the declaration of the cursor. If the cursor is supposed to be defined by an ALLOCATE CURSOR statement then remove the OPEN statement.

Severity

8 (error)