If you are troubleshooting Oracle problems, consider the following:
- The following Oracle precompiler options can have a marked effect on the behavior and the memory requirements of an Oracle
application. We recommend that you take time to review your Oracle documentation before changing the setting of these directives.
DBMS
HOLD_CURSOR
MAXOPENCURSORS
MODE
RELEASE_CURSOR
- Within an Oracle program it is possible to use the ALTER SESSION command to change the OPTIMIZER_GOAL. This can have a profound
effect on the performance of the application. Before using this syntax, we recommend that you consider what is the best optimisation
for an application in the general case rather than for a particular SQL statement. If you need to change the performance of
one particular statement, it is probably better to use HINTS. Consult your Oracle documentation for further information on
ALTER SESSION, OPTIMIZER_GOAL and HINTS.
- Oracle provides a method of reducing network access by using arrays within Embedded SQL statements. This enables the application
to perform 'batch' SQL commands, in that more than one row can be acted upon in a single SQL statement. See the section
Host Arrays in the chapter
Host Variables for more details.
The use of arrays enables an application, for example, to fetch ten rows at a time instead of one at a time. Oracle supply
an example program (normally called
sample3.pco) that uses an array to fetch multiple rows. Arrays are documented in the
Pro*Cobol Supplement to the ORACLE Precompilers Guide.
- Pro*Cobol treats BINARY host variables as though they had been defined with a picture clause of COMP. This means that BINARY
items will also be converted to COMP-5 when the Pro*Cobol comp5=yes option is used.
- Pro*Cobol always needs to be supplied with an include directive, unless the SQLCA copybook is in the current directory, because
it needs to know the location of the SQLCA copybook. If this is not supplied, Pro*Cobol gives an error on
filename.pco, where
filename can be any string of eight characters.
- When Pro*Cobol runs, it can generate useful information. When the COBSQL VERBOSE directive is used, COBSQL displays as much
of this information as it can.
To get the maximum information from Pro*Cobol, set the Pro*Cobol directive xref=yes. You can add this directive to the Pro*Cobol
configuration file
$ORACLE_HOME\PROxx\pcbcfg.cfg
where:
xx
|
is the Pro*Cobol version (for example, for Oracle 8.0 this is PRO80)
|
$ORACLE_HOME
|
is the root directory for the Oracle installation on your machine
|
- By using the COBSQL DISPLAY directive, the current Pro*Cobol directives can be seen on the screen. This will be followed by
the statistical information created by Pro*COBOL.
- If the COBOL LIST directive is used, COBSQL passes any information it has collected from the precompiler to the COBOL checker
for inclusion at the the bottom of the COBOL listing.