3 ms·
Oracle Linux packages GNU COBOL in their EPEL distribution. The package is mature. https://www.gnu.org/software/gnucobol/ https://www.gnu.org/software/gnucobol
by chasil 3y ago
Oracle Linux packages GNU COBOL in their EPEL distribution. The package is mature.
https://www.gnu.org/software/gnucobol/ https://www.gnu.org/software/gnucobol/
$ rpm -q gnucobol
gnucobol-3.2-1.el9.x86_64
$ rpm -qi gnucobol | tail -2
COBOL compiler, which translates COBOL
programs to C code and compiles them using GCC.
It will output intermediate C; one interesting thing is that the MOVE directive is mostly turned into memcpy().
I have been able to get the Oracle Pro*COBOL preprocessor to fully compile and run a demo database connection that connects to the "scott/tiger" schema and runs simple queries. Oracle packages both Pro*C and Pro*COBOL here (look for " Additional files for Pro*C and Pro*COBOL"):
https://www.oracle.com/database/technologies/instant-client.html https://www.oracle.com/database/technologies/instant-client....
It built with the two commands:
procob MODE=ANSI INAME=procobdemo.pco ONAME=procobdemo.cob
cobc -x -fixed procobdemo.cob /instantclient_21_12/cobsqlintf.o /instantclient_21_12/libclntsh.so
There is a similar "embedded SQL" implementation for PostgreSQL.
https://github.com/opensourcecobol/Open-COBOL-ESQL https://github.com/opensourcecobol/Open-COBOL-ESQL
There are a few other free COBOL compilers.
http://mainframeking.blogspot.com/2012/01/free-cobol-compilers.html http://mainframeking.blogspot.com/2012/01/free-cobol-compile...