"opensource COBOL 4j" is a COBOL compiler that translates COBOL parograms to Java programs. This compiler is deeply inspired by "opensource COBOL" which translates COBOL programs to C programs. (In fact, this repository contains a lot of source files of "opensource COBOL")
See Installation page.
Compile.
cobc -m [COBOL source file]
("cobc" command produces [PROGRAM-ID].java and [PROGRAM-ID].class in the current directory.)
Run.
java [PROGRAM-ID]
The functions in the following "implemented" list are tested using NIST COBOL85 test suite and 99% of the test cases are passed.
Implemented.
- Data calculation (MOVE, COMPUTE, ... )
- Control statements (IF, PERFORM, GO TO, ...)
- Some I/O functions (DISPLAY, ACCEPT, ...)
- Call statements
- Sequential files
- Indexed files
- Sort statements
- Embedded functions (ACOS, LENGTH, MAX, ...)
Not Implemented.
- Relative files
Known bugs
- Cannot call inline programs.