TOCPREVNEXTINDEX

AcuODBC User's Guide
Version 6.0

6.2.3 Examples of Default Mapping

The following section includes examples of how data dictionaries are formed. For more information, see section 6.2.1, "How the Data Dictionary Is Formed."

If your program has one file with the three records shown below, the underlined fields are included in the database table by default (this example assumes that ar-codes-key is named in a KEY IS phrase). Some fields do not appear in the table, but the data dictionary maps them to the "master" field names. The interface thus eliminates redundancies and gives you optimum performance.


Note: In the following example, the ship-weight and ship-instruct fields would be invisible to any ODBC application, unless you use a directive to make the fields visible.

    01  ar-codes-record.   
        03  ar-codes-key.   
            05  ar-code-type     pic x.     
            05  ar-code-num      pic 999.   

These fields are included because they are the key.

    01  ship-code-record.   
        03  filler               pic x(4).   
        03  ship-weight          pic s999v9.   
        03  ship-instruct        pic x(15).   
    01  terms-code-record.   
        03  filler               pic x(4).   
        03  terms-rate-1         pic s9v999.   
        03  terms-days-1         pic 9(3).   
        03  terms-rate-2         pic s9v999.   
        03  terms-descript       pic x(15).   

These fields are included because they comprise the largest record.

The diagram below shows how AcuODBC identifies database columns for some of the fields in the COBOL record, while other fields are mapped to those columns by the data dictionary; this means that all the fields are accessible to the COBOL program.


Note: If your application reads a record that should be a ship-code-record, the data that is displayed is unreadable. If you try to modify that record, you may receive an error message.


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.