TOCPREVNEXTINDEX

AcuODBC User's Guide
Version 6.0

6.2.1 How the Data Dictionary Is Formed

Acucorp data dictionaries (XFDs) enable the AcuODBC® interface to map COBOL records in the indexed or relative file system to "rows" and "columns" of data that can be accessed by common SQL commands. The rows and columns of data make up a "table" in a what can be considered a "virtual" database.

In the database table, each column contains the values for one data item. The column names are essentially the field names. The table that is built is based on the largest record in the COBOL file, and contains the fields from that record, plus any key fields (key fields are those that are named in KEY IS phrases of SELECT statements in the FILE CONTROL section). This ensures that data from all COBOL records fits within the table, and simplifies the storage and retrieval process. If you were to examine the database columns, only the fields from the largest record, and the key fields, would appear.


Note: If the field named in the KEY IS phrase is a group item, it does not become a column in the data dictionary table. Instead, the elementary items subordinate to the named group item each become a column.

You can force a group item to be a column by using the USE GROUP directive, described in section 6.3.10.

With multiple record formats (level 01), not all COBOL fields are represented in the database by name, but all fields are storable and retrievable. The data dictionary maps fields from all records of a file to the corresponding locations in the "master" (largest) record of the file, and thus to the "virtual" database table. Only the fields included in the XFD will be available to ODBC applications. Since AcuODBC has access to the data dictionary, it "knows" where the data from a given COBOL record fits in the database tables. This activity is invisible to the COBOL application.


Note: Each field in your Windows application must correspond to a field or group of fields in your COBOL FD or XFD. To ensure that this is the case, you may need to add field names to the data dictionary using the NAME directive.

To help you determine whether any fields need to be added, the next section describes which fields are automatically included and excluded.


Acucorp, Inc.
Voice: (800) 262-6585 (U.S.A. and Canada)
Voice: (858) 689-4500
Fax: (858) 689-4550

Please share your comments on this manual
or on any Acucorp documentation with the
Acucorp Communications Department.
TOCPREVNEXTINDEX
© 1988-2003 Acucorp, Inc.
All rights reserved.