Open COBOL ESQL 4J (OCESQL 4J) consits of open-source Embedded SQL pre-compiler and run time libraries for opensource COBOL 4J.
- opensource COBOL 4J
- 1.1.2 or later
- PostgreSQL
- 9.6
- 15
- OS
- Ubuntu 24.04
- Almalinux 9
- Java
- OpenJDK 11
-
Open-source database. OCESQL 4J currently supports PostgreSQL database only.
-
opensource COBOL 4j v1.1.12 or later.
-
sbt.
See Installation guides of opensource COBOL 4J.
Copy libcobj.jar, which is the runtime library of opensource COBOL 4J, to dblibj/lib/libcobj.jar
.
After you complete the installation procedure described in Installation guides of opensource COBOL 4J, you can find libcobj.jar in /usr/lib/opensourcecobol4j/
.
In addtion, execute the following command to prepare postgresql jdbc driver.
# Move to the root directory of Open-COBOL-ESQL-4j
cd Open-COBOL-ESQL-4j/
mkdir -p /usr/lib/Open-COBOL-ESQL-4j/
curl -L -o /usr/lib/Open-COBOL-ESQL-4j/postgresql.jar https://jdbc.postgresql.org/download/postgresql-42.2.24.jar
cp /usr/lib/Open-COBOL-ESQL-4j/postgresql.jar dblibj/lib
See the official Installation guide.
Run the following commands.
./configure --prefix=/usr/
make
make install
Then, add /usr/lib/Open-COBOL-ESQL-4j/ocesql4j.jar
and /usr/lib/Open-COBOL-ESQL-4j/postgresql.jar
to $CLASSPATH.
export CLASSPATH="$CLASSPATH":/usr/lib/Open-COBOL-ESQL-4j/ocesql4j.jar:/usr/lib/Open-COBOL-ESQL-4j/postgresql.jar
See README.md of opensource COBOL 4J.
Copy "libcobj.jar", generated by the installation of opensourcecobol4j, into "dblibj\lib". In addtion, execute the following command to prepare postgresql jdbc driver.
cd Open-COBOL-ESQL-4J
mkdir C:\ocesql4j\lib
curl -L -o C:\ocesql4j\lib\postgresql.jar https://jdbc.postgresql.org/download/postgresql-42.2.24.jar
copy C:\ocesql4j\lib\postgresql.jar dblibj\lib
Download here and install it.
The Windows version of Open COBOL ESQL 4J uses the CL compiler included in Visual Studio 2022, so you must have Visual Studio installed beforehand.
- Download the complete set of files for opensource COBOL 4J.
- Open win/ocesql.sln with Visual Studio.
- Select "Debug" or "Release" mode.
- Click "Build" -> "Build Solution".
After the build is completed, "cobj.exe" will be created in
win\x64\Debug
orwin\x64\Release
.
-
Open PowerShell.
-
Move to "dblibj" directory.
cd dblibj
-
Execute the following command.
sbt assembly
- If you build in Debug mode, change the 5th line of "win\install.ps1" from
\x64\Release\cobj.exe
to\x64\Debug\cobj.exe
. - Open PowerShell
- Move to "win" directory and execute "install.ps1".
cd win .\install.ps1
-
Each file is placed in the following location.
File name Location ocesql.exe C:\ocesql4j\bin ocesql4j.jar C:\ocesql4j\lib -
If you want to change the location of the files, modify "install.ps1".
- Add
C:\ocesql4j\bin
to "PATH". - Add
C:\ocesql4j\lib\ocesql4j.jar
andC:\ocesql4j\lib\postgresql.jar
to "CLASSPATH".