Using DatabaseBridge (Easydb) with Multi-Company / Multi-Year ISAM File Structures


When migrating multi-company, multi-year or otherwise multi-instance ISAM data layouts to isCOBOL DatabaseBridge (easydb), it is common for customers to maintain multiple directories containing identical file structures, for example:

/C01/data/clients
/C02/data/clients
/C03/data/clients
...

DatabaseBridge can handle these scenarios through a combination of EFD directives and iscobol.easydb properties.

This article explains how to configure these elements so that a single EDBI routine can serve multiple physical file locations.

  1. Define the Base Table Name Using an EFD Directive
    Each ISAM file that will be managed by easydb must declare an EFD directive to define the base table name:
    >>efd file=clients
    fd clifil.
    01 cli-rec.
        05 cli-key  pic x(6).
        05 cli-name pic x(30).

    The value provided in “file=” becomes the logical base name used during table resolution.
  2. Managing Multi-Directory Structures with iscobol.easydb.dirlevel
    iscobol.easydb.dirlevel tells easydb how many directory levels above the file should be incorporated into the generated table name.

    Example scenario
    Data directories:
    /C01/data/clients
    /C02/data/clients
    The file is two directory levels below /C01 or /C02, so:
    iscobol.easydb.dirlevel=2
    With this setting, DatabaseBridge constructs table names like:
    - c01dataclients >> from /C01/data/clients
    - c02dataclients >> from /C02/data/clients

  3. Mapping Table Names to EDBI Routines Using iscobol.easydb.mapping
    Because directory levels alter the final table name, the EDBI routine must be explicitly associated using the mapping property.
    For the previous example:
    iscobol.easydb.mapping=*clients=clients
    This instructs the runtime to route any file whose final table name ends with “clients” to the EDBI_clients routine.

    Notes on mapping behavior
    - You may use the wildcard * (only wildcard supported).

    - The first match wins, order matters.
    - Dots in filenames become underscores. Example: file1.db must be mapped as file1_db=file1.

  4. Complete Runtime Configuration
    In addition to the two properties above, the runtime configuration still requires JDBC properties specific to the database being used and the iscobol.file.index property set to easydb:
    Example (partial):
    iscobol.file.index=easydb
    iscobol.easydb.prefix=srv
    iscobol.easydb.commit_count=1
    iscobol.easydb.dirlevel=2
    iscobol.easydb.mapping=*clients=clients
    iscobol.jdbc.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
    iscobol.jdbc.url=jdbc:sqlserver://localhost:1433;user=sa;password=TheAdminPass;encrypt=false;DatabaseName=VERYANT;sendStringParametersAsUnicode=false
    ...

Summary
When working with multi-company/multi-year ISAM file layouts, DatabaseBridge can dynamically redirect file I/O to different database tables based on directory structure. The combination of:
- EFD table name definition
- Directory-based table naming (dirlevel)
- EDBI routine mapping (mapping)
allows a single file definition and a single EDBI routine to service many physical file instances cleanly and reliably.



Article ID: 356
Created: January 12, 2026
Last Updated: January 12, 2026
Author: Support KB Author

Online URL: https://support.veryant.com/phpkb/article.php?id=356