Changes the behavior of a
SELECTcursor that writes to Panther arrays
DBMS [WITH CURSOR
int]DBMS [WITH CURSOR
cursor] OCCUR CURRENT [MAX
- Name of declared
SELECTcursor. If the clause is not used, Panther uses the default
- Occurrence number where Panther should begin placing
- Specifies that Panther use the occurrence number of the "current" field. Panther begins writing at this occurrence number in the target arrays. The current field is the one containing the Panther screen cursor and is not necessarily a target variable.
- Specify maximum number of rows to fetch for a
intis less than 1, no rows are fetched.
By default, if the destination of a
SELECTis one or more arrays, Panther fetches as many rows as will fit in the arrays and begins writing at the first occurrence in the arrays.
DBMS OCCURchanges this default behavior for a
The setting is turned off by executing the
DBMS OCCURcommand with no arguments. Closing a cursor also turns off the setting. If a cursor is redeclared without being closed, the cursor continues to use the setting for
DBMS OCCURis ignored with a
// When executed, this procedure starts writing
// the result set at the current occurrence.proc select_type
DBMS DECLARE genre_cursor CURSOR FOR \
SELECT * FROM titles WHERE genre_code = :+code
DBMS WITH CURSOR title_cursor OCCUR CURRENT
DBMS WITH CURSOR title_cursor EXECUTE