Compaq COBOL AAQ2G1FTK User Manual

Page 583

Advertising
background image

Programming Productivity Tools

C.6 Using Oracle CDD/Repository (OpenVMS)

C.6.3 Recording Dependencies

When you compile a program with the /DEPENDENCY_DATA qualifier, the
compiler creates the following repository objects to represent the compiled
modules, the resulting object module, and the relationships between them:

A compiled module object is created for each separately compiled program.
The name of the object is the PROGRAM-ID name with hyphens translated
to underscores. Compiled module objects are put in the repository pointed
to by the logical name CDD$DEFAULT, or in the compatibility dictionary if
CDD$DEFAULT is not defined.

For each object file generated by the compilation, the compiler creates a
temporary file object. Each compiled module object contains a pointer to a file
object, and several compiled module objects can point to the same file object.
At the end of the compilation, the file object does not actually exist in the
repository. However, information relating the compiled module object and the
object file does exist in the repository.

The /DEPENDENCY_DATA qualifier can also direct the compiler to create
relationships between the compiled module object and other objects in the
repository:

If the source file contains a COPY FROM DICTIONARY statement, the
compiler creates a CDD$COMPILED_DEPENDS_ON relationship between
the compiled module object and the record or field definition that is being
copied. It also copies the repository object into the compiled module.

If the source file contains a RECORD statement, the compiler creates
a relationship between the compiled module object and the specified
repository object, but it does not copy the repository object into the compiled
module. The relationship can be either CDD$COMPILED_DEPENDS_ON
or CDD$COMPILED_DERIVED_FROM. The default relationship type is
CDD$COMPILED_DEPENDS_ON.

For example, recall the program that used COPY FROM DICTIONARY to include
the customer and employee address record definitions:

IDENTIFICATION DIVISION.
PROGRAM-ID. MASTER-FILE.
DATA DIVISION.
WORKING-STORAGE SECTION.
COPY "DEVICE:[VMS_DIRECTORY]SALES.CUSTOMER_ADDRESS_RECORD" FROM DICTIONARY.
COPY "DEVICE:[VMS_DIRECTORY]SALES.EMPLOYEE_ADDRESS_RECORD" FROM DICTIONARY.

.
.
.

When this program is compiled with the /DEPENDENCY_DATA qualifier, the
following objects are created in the repository:

A compiled module object called MASTER_FILE

A temporary file object representing the object file produced by the
compilation

A relationship between the MASTER_FILE compiled module object and the
object file

A relationship between the MASTER_FILE object and the CUSTOMER_
ADDRESS_RECORD definition

Programming Productivity Tools C–19

Advertising