Previous Topic: Reduce Amounts of Data ReturnedNext Topic: Statements Used in Cursor Operations


Cursor Operations

SQL statements typically alter or fetch data from many rows of a table at once. If 2,000 rows satisfy the search criteria you specify on a statement, CA OPS/MVS processes all 2,000 rows. However, this complicates matters when you invoke SQL statements from OPS/REXX. When you do not know how much output a statement will generate, it may become inefficient to assign that output to REXX variables.

SQL (and the CA OPS/MVS product) resolve this problem through a set of statements that manage cursor operations. In a cursor operation, you specify a range of rows to update or delete. Starting with the first row, CA OPS/MVS then updates or deletes each row one at a time until it processes all rows in the range.

You can execute cursor operations from a TSO/E REXX program, a TSO CLIST, an OPS/REXX program, or an AOF rule. You cannot execute cursor operations from a TSO terminal.