![]() | Programming Guide | ![]() |
Changes the behavior of a
SELECTcursor that writes to Panther arrays
DBMS [WITH CURSORcursor] OCCURoccInt[MAXint]DBMS [WITH CURSORcursor] OCCUR CURRENT [MAXint]
WITH CURSORcursor- Name of declared
SELECTcursor. If the clause is not used, Panther uses the defaultSELECTcursor.occInt- Occurrence number where Panther should begin placing
SELECTresults.CURRENT- 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.
MAXint- Specify maximum number of rows to fetch for a
SELECTorCONTINUE. Ifintis 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 aSELECTcursor.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 forSELECTstatements andCONTINUEcommands.
DBMS OCCURis ignored with aCATQUERYcursor.
// 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
return
![]()
![]()
![]()
![]()