OPEN (insert cursor)
Initializes an insert cursor.
Syntax
OPEN cid
- cid is the identifier of the insert cursor.
Usage
The OPEN statement initializes the insert cursor if the specified cursor was
created with a DECLARE …
INSERT statement.
Once the insert cursor is opened, you can add rows with the PUT statement.
When
used with an insert cursor, the OPEN instruction
cannot include a USING clause.
A subsequent OPEN statement
closes the cursor and then reopens it.
If the insert cursor was not declared WITH HOLD option, theOPEN
instruction generates an SQL error if there is no current transaction started.
If you release cursor resources with a FREE instruction, you cannot use the cursor unless you declare the cursor
again.