Compaq COBOL AAQ2G1FTK User Manual
Page 581
Programming Productivity Tools
C.6 Using Oracle CDD/Repository (OpenVMS)
Oracle CDD/Repository can also store information about the structure of a
program, such as the compiled modules that go into making an object module,
or the record and field definitions that are used by COBOL programs. If, for
example, a record definition needs to change, you can analyze the impact that
change will have on the various programs that use it. When the definition is
changed, Oracle CDD/Repository notifies the modules that the record definition is
out of date, and the program can be recompiled.
To take advantage of dependency recording, you must:
•
Enable dependency recording by compiling your program with the
/DEPENDENCY_DATA qualifier.
•
Direct the COBOL compiler to a repository or a compatibility dictionary in
which to store the dependency information.
C.6.1 Creating Record and Field Definitions
The following example shows how you can use CDO to create a number of fields
representing name and address information:
DEFINE FIELD NAME
DATATYPE IS TEXT
SIZE IS 25 CHARACTERS.
DEFINE FIELD COMPANY_NAME
DATATYPE IS TEXT
SIZE IS 25 CHARACTERS.
DEFINE FIELD STREET
DATATYPE IS TEXT
SIZE IS 20 CHARACTERS.
DEFINE FIELD CITY
DATATYPE IS TEXT
SIZE IS 20 CHARACTERS.
DEFINE FIELD STATE
DATATYPE IS TEXT
SIZE IS 2 CHARACTERS.
DEFINE FIELD ZIP
DATATYPE IS TEXT
SIZE IS 5 CHARACTERS.
The fields can then be used to create records. The following example creates two
records — one for customer address information and one for employee address
information:
DEFINE RECORD CUSTOMER_ADDRESS_RECORD.
NAME.
COMPANY_NAME.
STREET.
STATE.
ZIP.
END RECORD.
DEFINE RECORD EMPLOYEE_ADDRESS_RECORD.
NAME.
STREET.
STATE.
ZIP.
END RECORD.
Programming Productivity Tools C–17