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:
iscobol.file.index=dci
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). The DBMaker public FTP repository (ftp://ftp.dbmaker.com/pub/DBMaker/) includes the setups of each DBMaker version. Among the setups there is an archive named "DCI-version-.zip" that includes DCI libraries for various COBOLs. The "iscbl" folder in the zip contains the libraries required by isCOBOL. In order 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.
You may find two different libraries: dci and dci_2016. The former is suitable for isCOBOL 2015 and previous versions, the latter is suitable for the latest isCOBOL versions.
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.
Refer to the DBMaker Error Reference and Message manual for the complete list of error codes.
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.