Skip to content

yutaro-sakamoto/Open-COBOL-ESQL-4j

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Open COBOL ESQL 4J

Open COBOL ESQL 4J (OCESQL 4J) consits of open-source Embedded SQL pre-compiler and run time libraries for opensource COBOL 4J.

Supported software versions

  • opensource COBOL 4J
    • 1.1.2 or later
  • PostgreSQL
    • 9.6
    • 15
  • OS
    • Ubuntu 24.04
    • Almalinux 9
  • Java
    • OpenJDK 11

Installation and Usage

Requirements

  • Open-source database. OCESQL 4J currently supports PostgreSQL database only.

  • opensource COBOL 4j v1.1.12 or later.

  • sbt.

Installation (Linux)

Install opensource COBOL 4J

See Installation guides of opensource COBOL 4J.

Prepare jar files

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

sbt

See the official Installation guide.

Install Open COBOL ESQL 4J

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

Installation (Windows)

Install opensource COBOL 4J

See README.md of opensource COBOL 4J.

Prepare jar files

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

sbt

Download here and install it.

Install Open COBOL ESQL 4J

Install Visual Studio

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.

Build a solution file

  1. Download the complete set of files for opensource COBOL 4J.
  2. Open win/ocesql.sln with Visual Studio.
  3. Select "Debug" or "Release" mode. alt text
  4. Click "Build" -> "Build Solution". alt text After the build is completed, "cobj.exe" will be created in win\x64\Debug or win\x64\Release.

Build Scala Files

  1. Open PowerShell.

  2. Move to "dblibj" directory.

     cd dblibj
    
  3. Execute the following command.

    sbt assembly
    

Place files in the appropriate location

  1. If you build in Debug mode, change the 5th line of "win\install.ps1" from \x64\Release\cobj.exe to \x64\Debug\cobj.exe.
  2. Open PowerShell
  3. 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".

Set the environment variables

  1. Add C:\ocesql4j\bin to "PATH".
  2. Add C:\ocesql4j\lib\ocesql4j.jar and C:\ocesql4j\lib\postgresql.jar to "CLASSPATH".

About

No description, website, or topics provided.

Resources

License

GPL-3.0, GPL-3.0 licenses found

Licenses found

GPL-3.0
LICENSE
GPL-3.0
COPYING

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 38.3%
  • C 34.9%
  • Scala 13.4%
  • Makefile 8.8%
  • Lex 1.8%
  • Yacc 1.7%
  • Other 1.1%