contents.gifindex.gifprev1.gifnext1.gif

Oracle: Configuration File Variables

These are the runtime configuration file variables that are specific to Oracle. Configuration file variables that are generally applicable to any RDBMS with which Acu4GL communicates are discussed in the Compiler and Runtime Options section.

A-ORACLE-ERROR-FILE

This configuration file variable allows you to map errors using a text file to supplement the default method of providing errors. By adding the name of the file that contains the actual error mapping to A_ORACLE_ERROR_FILE, database specific errors are mapped to COBOL errors.

Example

A sample syntax for this configuration file variable would be:

A_ORACLE_ERROR_FILE=ORCLerrs

where:

ORCLerrs is a file of a specified format containing a mapping of database specific errors to COBOL errors. One same entry might be:

1 DUPLICATE_RECORD

A-ORA-HINTS

The Oracle Hints feature is enabled with this variable. Set A-ORA-HINTS to 1 (default) to turn on the feature. The default is 1, or on. To turn off the feature, set it to 0. Hints can improve runtime performance significantly in some situations.

Note that keys must use the ACUCOBOL-GT naming convention for naming indexes in the database to this function. For example, the primary key on the file ftest would be named iftest_0.

Oracle hints can improve database performance considerably by 'strongly suggesting' to the oracle query optimizer that it use a given index to process a query.

COMMIT-COUNT

The value of COMMIT-COUNT indicates the conditions under which you want to issue an automatic COMMIT-WORK operation.

Examples

1) COMMIT-COUNT 0

A commit will be issued when no locks are held, either because all files that had locked records have been closed, or because a COBOL COMMIT verb has been issued. This is the default value.

2) COMMIT-COUNT n

A commit will be issued after n operations. WRITE, REWRITE and DELETE count towards n; READ, START and READ NEXT do not.

3) COMMIT-COUNT -1

No commit will be issued by the Acu4GL interface. When COMMIT-COUNT is set to -1, there are two alternate ways to perform a commit or rollback.

One way is to call sql.acu with COMMIT WORK or ROLLBACK WORK.

The second way is to use the COBOL verbs COMMIT and ROLLBACK, available in ACUCOBOL-GT.

COMMIT-COUNT is set to -1 internally when you use the transaction management facilities available in the ACUCOBOL-GT compiler.

A COMMIT WORK will, however, be issued on exit from the runtime (for example, on execution of a STOP RUN).

See also

Using the sql.acu Program , and Supported Features .

MAX-CURSORS

MAX-CURSORS is the number of cursors (parameterized queries) in Acu4GL's cursor cache. The default value is 100. The range is 1-100. If you set this variable to a number less than the maximum of 100, you may reduce the number you specify in the Oracle system parameter open_cursors by a like amount. The value of Oracle's open_cursors should exceed MAX-CURSORS by at least 7.

Example

To allow your application to use up to 23 cursors, you would specify:

MAX-CURSORS 23

in the configuration file.

See also

Checking System Parameters.

ORA-LOGIN

ORA-LOGIN indicates the user name under which you want to connect to the database system.

Example

To connect to the database with the user name MYNAME, you would specify:

ORA-LOGIN MYNAME

in the configuration file.

If ORA-LOGIN is not set, the runtime will attempt to do an automatic login for you. For autologin to succeed, you must have set up an account OPS$USER where USER is the same as your computer login name.

See also

ORA-PASSWD configuration variable.

Setting Up a User Account.

ORA-PASSWD

The variable ORA-PASSWD should be set to the password assigned to the database account associated with the user name specified by ORA-LOGIN.

Example

For example, if the account with the user name has the associated password CW021535, you would specify:

ORA-PASSWD CW021535

in the configuration file or the environment.

If ORA-LOGIN has not been set, the runtime assumes you want to do an automatic login; ORA-PASSWD is ignored and need not (and for system security, should not) be set.

See also

ORA-LOGIN configuration variable.

USER-PATH

USER-PATH indicates the user name or names to be used when Acu4GL searches for files. The order of the names is significant. The syntax for this variable is:

USER-PATH user1 [user2]...

Where the user argument may either be the name of a user on the system, or a period (.), which indicates the files owned by yourself.

The type of OPEN being issued for the file will determine the effects of this setting.

Examples

If an OPEN INPUT or OPEN I/O is issued, and there is a USER-PATH variable defined in the runtime configuration file, Acu4GL will search for a user of the named file in the following sequence of places:

1) the list of users in USER-PATH

2) public synonyms

The first valid file will be opened.

If an OPEN INPUT or OPEN I/O is issued, and there is no USER-PATH variable in the runtime configuration file, Acu4GL will search for a user of the named file in the following sequence of places:

1) the user named for login (ORA-LOGIN or OPS$user-name)

2) public synonyms

Acu4GL will open the first file that has a valid combination of user and file name.

If an OPEN OUTPUT is issued (whether USER-PATH is present or not), a new table will be created with the owner being:

1) the name specified in ORA-LOGIN or

2) the name constructed by automatic login (see Setting Up a User Account ).

See also

The ACUCOBOL-GT User's Guide Chapter 2, for a discussion of the FILE-PREFIX configuration variable and general guidelines on the use of file search paths.

See also: Setting Up the Search Path