The Vision File Connector
The Vision File Connector allows you you to work on Acucobol-GT Vision files by separating ISAM native access from the java process.
The File Connector executable must be built by rebuilding an Acucobol-GT runtime including a special library provided along with isCOBOL:
Platform
Import library
Linux /Unix
$ISCOBOL/native/static/lib/libctvision.a
Windows
%ISCOBOL%\native\static\lib\ctvision.lib
Use a ctivision library from a 32-bit isCOBOL to rebuild a 32-bit Acucobol-GT runtime.
Use a ctivision library from a 64-bit isCOBOL to rebuild a 64-bit Acucobol-GT runtime.
The minimum Acucobol-GT version required to build the File Connector executable is 6.0 on Linux/Unix and 7.0 on Windows.
Linux/Unix
The build process on Linux/Unix consists in the following steps:
1. retrieve the lib folder of your Acucobol-GT distribution
2. copy the libctvision.a library to that folder
3. edit the Makefile
a. remove any reference to amain.o
b. add libctvision.a to the items of the runcbl entry.
c. change runcbl to vfc as name of the output object
 
For example, the entry:
runcbl: amain.o $(SUBS)
$(CC) $(EXEC_LDFLAG) $(LDFLAGS) -o runcbl amain.o $(SUBS) libruncbl.a \
$(LIBS) $(SYS_LIBS) $(SYS_C_LIBS) $(EXTOBJS) $(EXTLIBS)
will change to:
runcbl: $(SUBS)
$(CC) $(EXEC_LDFLAG) $(LDFLAGS) -o vfc $(SUBS) libruncbl.a \
$(LIBS) $(SYS_LIBS) $(SYS_C_LIBS) $(EXTOBJS) $(EXTLIBS) libctvision.a
4. run the make command
Windows
The build process on Windows consists in the following steps:
1. retrieve the lib folder of your Acucobol-GT distribution
2. copy the ctvision.lib library to that folder
3. edit the file mswinsub.c as follows. Change the following part
/* windows_startup - this is called only when running under Microsoft */
/* Windows. It is passed the same parameters as WinMain - see the */
/* Microsoft documentation for details. Use this routine to register */
/* any window classes that you need. Return 0 if an error occurs and */
/* you need to shut-down, otherwise return 1. */
 
int
windows_startup(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine,
int nCmdShow)
{
return 1;
}
to
extern int VFC_startup();
 
/* windows_startup - this is called only when running under Microsoft */
/* Windows. It is passed the same parameters as WinMain - see the */
/* Microsoft documentation for details. Use this routine to register */
/* any window classes that you need. Return 0 if an error occurs and */
/* you need to shut-down, otherwise return 1. */
 
int
windows_startup(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
VFC_startup(lpCmdLine);
return 0;
}
4. open the wrun32 project with Visual Studio, add the ctvision.lib library to it and build the project.
 
5. Copy the generated wrun32.dll to the bin folder of isCOBOL or to another folder that comes before the Acucobol-GT bin directory in the %PATH%.
6. Copy wrun32.exe from the Acucobol-GT bin directory to the same folder where you copied wrun32.dll and rename wrun32.exe to vfc.exe.
Usage
In order to make isCOBOL use the Vision File Connector as file handler, the following setting must appear in the configuration:
iscobol.file.index=vfc
The vfc file handler runs the executable file vfc. If this file is not in the system Path, you can specify its full name by setting the iscobol.file.connector.program.vfc configuration property.
The executable file vfc must be of the same architecture as the Acucobol-GT libraries, but it can be of a different architecture than the isCOBOL Framework. For example, the following combinations are both valid:
64-bit isCOBOL + 64-bit vfc.exe + 64-bit Acucobol-GT runtime libraries
64-bit isCOBOL + 32-bit vfc.exe + 32-bit Acucobol-GT runtime libraries
The following combination is not valid, instead:
64-bit isCOBOL + 64-bit vfc.exe + 32-bit Acucobol-GT runtime libraries
An acushare process (only on Linux/Unix) and a valid Acucobol-GT license are required for vfc to work.
The Vision File Connector reads configuration settings from the first applicable between:
the system environment variables
the file indicated by the A_CONFIG environment variable
the file \etc\cblconfig (on Windows) or /etc/cblconfig (on Linux/Unix)
Consult Acucobol-GT documentation for details about configuration entries affecting the Vision file system.