Home

Getting Started

Utilities

Indexing

Omnidex

Development

Tutorials

Quick Links

 

Utilities

OACOMP

Parsing Phase

Validation Phase

Compilation Phase

 

OACOMP

Phases

Phases

Parsing Phase

OACOMP begins by parsing the catalog source file specified at run time. When OACOMP parses a catalog source file it:

upshifts all alphabetic characters. Quoted file specifications and some other quoted strings are not upshifted.
parses reserved words like TABLE and TYPE.
While parsing, OACOMP displays the string Parsing... on the terminal screen as well as any syntax errors found. For example:

[ -1001] Syntax error in token at line #13
TYPE MASTRE
^

In all syntax error messages, OACOMP displays the line number where the error occurred. In the example above, it is line #13. Below the error message, OACOMP displays the erroneous line with a caret below the first letter of the incorrect token. In the example above, MASTRE is specified incorrectly. The line should have read:

TYPE MASTER

After the parsing phase is successfully completed with no errors, the validation phase is performed.

 

Validation Phase

If your catalog source file is free of syntax errors, OACOMP validates the entities (DATABASEs, TABLEs and so on) to be sure that all references are logically consistent. As it validates the catalog, OACOMP displays the string Parsed; Validating... on your terminal screen.

When a declared entity has no definition within the catalog, OACOMP returns an error message, like the one below, before aborting.

[Parsed; Validating...

[ 10008] Match not found (Column-Spec)

>CUSTOMER_NUM<; Env=ORDERSEC; DB=ORDERS; Tbl=CUSTOMERS;

Clause=PARENT

%% Compilation ABORTED after 1 Validation error(s)! %%

In all validation error messages, OACOMP displays the declaration where the mismatch occurs.

On the line below the error message, OACOMP displays the mismatched value inside angle brackets (>CUSTOMER_NUM<, in the example above), and tells where the mismatch occurs. In the example above, this is in the ENVIRONMENT statement for ORDERSEC, the DATABASE statement for ORDERS, the TABLE statement for CUSTOMERS, and in the PARENT clause.

The key, CUSTOMER_NUM, declared for the table CUSTOMERS is not defined for that table in a COLUMN statement.

OACOMP does not validate the accuracy of external references to existing data structures. It validates for cross references within the environment catalog.

If the validation phase of the compile completes successfully, OACOMP compiles the environment source file.

 

Compilation Phase

When OACOMP compiles an environment catalog source file, it displays the following string on the terminal screen:

Parsed; Validated; Compiling...

When the compile has completed successfully, OACOMP displays the following and returns to an operating system prompt:

Parsed; Validated; Compiled; Done

** Environment Compiled Successfully! **

If a compiled environment catalog by that name already exists, OACOMP automatically overwrites the existing file with the new file.
If an existing file that is not an environment catalog bears the name you assigned the compiled environment file, OACOMP issues an error during the validation phase.

Parsed; Validating...

[ 40] Object file connect error (ORDERSEC), error=41999, info=0

In the example above, “ORDERSEC”, which was assigned to the compiled environment, conflicts with an existing file that is not an environment catalog and is enclosed in parentheses in the error message.

If the compile operation is successful, the compiled environment catalog is created with the name specified at run time. After compiling, the environment catalog is ready to be installed with OMNIDEX index keys through DBINSTAL and accessed through the OmniAccess routines.

Keep the source files for the environment catalogs. They provide useful information about the data, and are therefore useful in resolving technical support issues. They also serve as a backup, in case something happens to a compiled environment catalog.

When upgrading to a new major version, 3.8 to 4.0 for example, oacomp will not recognize an existing compiled environment catalog as an Omnidex environment catalog, producing an error. If this occurs, you must manually delete the older version environment catalog prior to running oacomp. This is not an issue when upgrading a minor version, 4.0.6 to 4.0.8 for example.

 

Top