Oracle Pro*C Analyzer

Oracle Pro*C Analyzer#


This page describes how Oracle Pro*C files can be analyzed using Lattix. Oracle Pro*C files are C files that are pre-processed to generate standard C files.

The following approach is used:

  • Use this tool to extract the database dependencies from Pro*C files and to generate a Lattix LDI file.

  • Use a standard Lattix C/C++ module to extract the dependencies between C/C++ files.

  • Use the Oracle or SQL Server module to extract the dependencies in the database.

You can create a multi-module project with one or more of these three modules to build a project that shows the dependencies between C/C++ and database.


The process consists of the following steps:

Step 1#

First generate the C files using the Oracle Pro*C pre-processor. Now these C files can be analyzed by Lattix.

Step 2#

toolcmd.bat -command oraclec [-srcdir dir]|[-srcfile file]
            [-prefix string] [-output filename.ldi.xml]

-srcdir dirname: Specify directory containing the C source files that have been generated by the Pro*C processor.

-srcfile filename: Specify a source file to be analyzed. A -srcdir or a -srcfile argument is required.

-prefix string: Specify a string which will be added as a prefix to the database atom names. Typically, this is the database name that is added to the atom names that are generated. This is used to map atom names generated by this tool to the atom names that are generated by the database.

-output filename.ldi.xml: Specify the name of a ldi.xml file for the output.

You can load this LDI file into Lattix to immediately examine the dependencies between the C files and the database elements.

Step 3#

Generate a ‘udb’ file using Understand for C++. Load this file into the same project and perform a module merge. You can now analyze the impact transitively. For instance, assume that there are file A1.c depends on file A2.c. Also assume that, A2.c depends on the CUST table in the BUSINESS schema. This means that

A1.c --> A2.c --> BUSINESS.CUST

Now a change to BUSINESS.CUST will show that A2.c is affected directly while A1.c is affected indirectly.

Step 4#

Add yet another module to the Lattix project corresponding to the database. Now merge all of the modules, and you will see:

  • How the C files depend on each other (using the C/C++ module).

  • How the database elements depend on each other (using the database module).

  • How the C files depend on the database (using the LDI file that is generated by this tool).