HP 3000 Manuals

Ch 8. Processing with Cursors [ ALLBASE/SQL COBOL Application Programming Guide ] MPE/iX 5.0 Documentation


ALLBASE/SQL COBOL Application Programming Guide

Chapter 8  Processing with Cursors 

Processing with cursors gives you the option of operating on a
multiple-row query result, one row at a time.  The query result is
referred to as an active set.  You use a pointer called a cursor to move
through the active set, retrieving a row at a time into host variables
and optionally updating or deleting the row.  Reporting applications may
find this technique useful.  Update applications such as those that
periodically operate on tables not being concurrently accessed (e.g.,
inventory adjustments) may also find this technique useful.

This chapter presents:

   *   SQL Cursor Commands

   *   Transaction Management for Cursor Operations (Further discussion
       of transaction management is found in the ALLBASE/SQL Reference 
       Manual .)

   *   Sample Program Using Cursor Operations

The emphasis in this chapter is on FETCHing one row at a time.  For an
example of using the FETCH command with the BULK option, see the "BULK
FETCH" section of Chapter 9.



MPE/iX 5.0 Documentation