The Micro Focus File Connector
The Micro Focus File Connector allows you to work on Micro Focus indexed files by separating ISAM native access from the java process.
The Micro Focus File Connector is available only in the 32-bit architecture, though the MFC executable can be called by both the isCOBOL 32-bit runtime and the isCOBOL 64-bit runtime.
The File Connector executable must be built by compiling a program to exe using the Micro Focus compiler. A special library is necessary for the compilation. The library is provided along with isCOBOL only for 32 bit platforms:
Platform
Import library
Linux /Unix
$ISCOBOL/native/static/lib/libctmf.a
Windows
%ISCOBOL%\native\static\lib\ctmf.lib
The build process consists in the following steps:
1. create a source file named mfc.cbl and include the following code into it
       IDENTIFICATION DIVISION.
       PROGRAM-ID. mfc.
      
       PROCEDURE DIVISION.
       MAIN SECTION.
       MAIN-PROGRAM.
           call "myMain".
       STOP-RUN.
           STOP RUN.
2. put the source file in the same folder of the ctmf library and compile it with the following command:
Linux/Unix
cob -x mfc.cbl libctmf.a -o mfc
Windows
cobol mfc.cbl /case /litlink
cbllink -Omfc.exe mfc.obj ctmf.lib ws2_32.lib oldnames.lib
Note - The above command has been tested on Micro Focus Net Express 5.0 bound to Microsoft Visual Studio 2005. Different Micro Focus and Visual Studio versions may require different import libraries referenced on the command line.
Usage
In order to make isCOBOL use the Micro Focus File Connector as file handler, the following setting must appear in the configuration:
iscobol.file.index=mfc
The mfc file handler runs the executable file mfc. If this file is not in the system Path, you can specify its full name by setting the iscobol.file.connector.program.mfc configuration property.
mfc requires a Micro Focus runtime installed in the system in order to work correctly. On Linux, $COBDIR/bin must appear in the system Path and $COBDIR/lib must appear in the system Library Path.