DCI
The DBMaker’s COBOL Interface (DCI) allows isCOBOL to work on the DBMaker RDBMS with a ISAM approach.
DCI is available for Windows and Linux platforms.
In order to associate the DCI file handler to your indexed files, the following setting must appear in the configuration:
It’s possible to associate only specific files to DCI. For example, the following configuration uses JIsam for all indexed files, except for "file1" that is associated to DCI:
iscobol.file.index=jisam iscobol.file.index.file1=dci |
Indexed files can be associated to DCI also through the CLASS clause in the SELECT statement. E.g.
SELECT FILE1 ASSIGN TO FILE1-PATH ORGANIZATION INDEXED CLASS "com.iscobol.io.DynamicDCI" ACCESS MODE DYNAMIC RECORD KEY FILE1-KEY STATUS FILE-STATUS. |
The DCI library (dci.dll on Windows and libdci.so on Linux) is required in the library path (%PATH% on Windows and $LD_LIBRARY_PATH on Linux).
To retrieve the necessary libraries
2. select the desired DBMaker version from the bulleted list,
3. scroll down to find the section "DCI Downloads",
4. click on the download button to download the zip,
5. when the download is completed, open the zip and find the folder that matches your platform and open it,
6. find the "iscbl" subfolder and extract the desired dci library.
The proper library depends on the DBMaker version and on the isCOBOL version:
• until DBMaker version 5.4.2 you use the dci library (dci.dll on Windows, libdci.so on Linux) for isCOBOL 2015 R1 and previous, and the dci_2016 library (dci_2016.dll on Windows, libdci_2016.so on Linux) renamed to dci for isCOBOL 2016 R1 and later.
• since DBMaker version 5.4.3 instead you use the dci library (dci.dll on Windows, libdci.so on Linux) for isCOBOL 2016 R1 and later, and the dci_2015 library (dci_2015.dll on Windows, libdci_2015.so on Linux) renamed to dci for isCOBOL 2015 R1 and previous.
Using an improper dci library may lead to memory access violation errors.
To have the DCI library automatically loaded, copy dci.dll to the isCOBOL’s bin directory on Windows and copy libdci.so to the isCOBOL’s native/lib directory on Linux.
Note - the DCI library is not thread safe. If you wish to use DCI in a application server environment like Tomcat or the isCOBOL Thin Client, then you should consider to rely on the
The DCI File Connector.
Basic Configuration
DCI requires EFD dictionaries in order to manage COBOL indexed files as DBMaker database tables. The dictionaries are generated by the Compiler if the
-efd option is used.
DCI looks for the configuration file pointed by the environment variable DCI_CONFIG. The basic configuration is:
Configuration Entry | Meaning |
---|
DCI_DATABASE | Name of the DBMaker database to connect |
DCI_LOGIN | User name credential |
DCI_PASSWD | Password credential |
DCI_EFDPATH | Directory where EFD dictionaries are stored. |
Example - the following configuration allows to connect to the default database DBSAMPLE5 with user SYSADM without password having the EFD dictionaries stored in the folder C:\myapp\efd:
DCI_DATABASE DBSAMPLE5 DCI_LOGIN SYSADM DCI_EFDPATH C:\myapp\efd |
Library Routines
Refer to
DCI for the list of supported DCI library routines.
Troubleshooting
All the errors that can be mapped to a COBOL file status are mapped to a COBOL file status.
Other errors are returned as secondary code of the file status
9D.
The following table lists the most common ones:
Error code | Description |
---|
03 | EFD dictionary not found. |
5510 | Invalid DCI connection handle. |
5515 | Mismatch between EFD and table structure. |
Where to go next
Refer to the
DCI Manual from Casemaker for more information about the usage of DCI, including all the available configuration entries and library routines.