When a COBOL application performs a start operation, Acu4GL/Oracle builds a sequence of one or more SQL queries to satisfy the requirements of the start operation. When a result set is found that matches the criteria of the start operation, that key value is saved for use on a subsequent READ NEXT/PREVIOUS operation. The cursor used to locate the target key value is not left open in order to maximize concurrency. When a READ NEXT/PREVIOUS operation is subsequently performed, a new query is generated. This could result in a sequence of queries such as the following.
For the START operation:
WHERE ( partial_key1_seg1 = :w0 AND partial_key1_seg2 = :w1 ) ORDER BY partial_key1_seg1 ASC, partial_key1_seg2 ASC, partial_key1_seg3 ASC For the READ NEXT operation: WHERE ( partial_key1_seg1 = :w0 AND partial_key1_seg2 >= :w1 ) ORDER BY partial_key1_seg1 ASC, partial_key1_seg2 ASC, partial_key1_seg3 ASC
The configuration variable A_ORA_KEEP_START_CURSOR was created for this purpose.
FALSE | The current default. The interface functions as in previous versions. |
TRUE | The cursor used for the start operation stays in an open state for use by subsequent operations. Setting this variable to TRUE eliminates the generation of the second SQL query for the READ operation. |