


Acu4GL makes use of cursor caching to process Oracle RDBMS data efficiently. A cursor is a prepared query, saved in a parameterized format. When a like function is to be performed on a different record (such as a GET NEXT), the task can be performed by executing the saved query with new parameters. This improves performance by eliminating the need to regenerate the query. The number of cursors available to your COBOL application may need to be adjusted as described below.
Acu4GL cursor
Acu4GL allows you to specify the number of cursors available to your application by setting the configuration variable MAX_CURSORS. The default (and the maximum) value is 100; you need not change it unless you need to save memory. If you must reduce MAX_CURSORS, set it to a value that is at least the number of files that your application will use.
Oracle cursors
You can set Oracle's initialization variable OPEN_CURSORS to specify the maximum number of cursors available to any application using Oracle. Many versions of Oracle have a default of 50. The Acu4GL product handles all of the file processing of your COBOL application, and it uses seven extra cursors just for overhead functions. So OPEN_CURSORS must be set to a number which is at least the total of MAX_CURSORS plus 7.
Examples
If you use the default value of Acu4GL's MAX_CURSORS, Oracle's OPEN_CURSORS must be modified as follows:
| Default value of MAX_CURSORS | 100 |
| Acu4GL internal overhead cursors | 7 |
| You should set Oracle's open_cursors to | 107 |
| Set MAX_CURSORS to | 23 |
| Acu4GL internal overhead cursors | 7 |
| Set Oracle's open_cursors to at least | 30 |
In summary, what you need to do is:
Set MAX_CURSORS to the number of cursors you want to have in addition to those required for Acu4GL overhead.
Set the Oracle system parameter open_cursors to indicate the total number of cursors you want to have. To do this, look in Oracle's "init.ora" and "initSID.ora", or any other database initialization files used at your site, and add or modify the line:
open_cursors = nnn
Make sure nnn is at least equal to the sum of Acu4GL's internal needs (7) and the value of MAX_CURSORS.