RES is a pure Java based Open Source Cobol to Java translator. It creates maintainable Java code for a subset of VS Cobol syntax. It has been developed with JDK, JTB and Javacc.
Features
- VS Cobol II and additions parsed.
- Translated Java code can be run directly or refactored on IDE easily.
- Options to put Cobol statements in comments in Java.
- Essential EXEC SQL support.
- And more coming...
License
GNU General Public License version 2.0 (GPLv2)Follow RES - An Open Cobol To Java Translator
Other Useful Business Software
$300 Free Credits to Build on Google Cloud
Start your next project with $300 in free Google Cloud credit. Spin up VMs, run containers, query petabytes in BigQuery, or build agents with Gemini Enterprise Agent Platform. Once your credits are used, keep building with 20+ always-free tier products including Compute Engine, Cloud Storage, GKE, and Cloud Run functions. No commitment required—just sign up and start building.
Rate This Project
Login To Rate This Project
User Reviews
-
Does this tool support converting COBOL copybooks too to Java. I tried executing this tool on some of the copybooks (.CPY files) present in cobol folder and it seems to be expecting Identification division in copybook too? Any workaround for this? C:\RES>java -jar RES.jar cobol\KP005.CPY RES Cobol 2 Java alpha1.9(08/05/2010) - COPYRIGHT 2009 C:\RES\cobol\KP005.CPY Parsing Cobol started for: C:\RES\cobol\KP005.CPY com.res.cobol.parser.ParseException: Encountered " "move" "MOVE "" at line 0, column 12. Was expecting one of: <EOF> "identification" ... at com.res.cobol.parser.CobolParser.generateParseException(CobolParser.java:51349) at com.res.cobol.parser.CobolParser.jj_consume_token(CobolParser.java:51170) at com.res.cobol.parser.CobolParser.CompilationUnit(CobolParser.java:2968) at com.res.cobol.Main.parse(Main.java:205) at com.res.cobol.Main.execute(Main.java:148) at com.res.cobol.Main.main(Main.java:73) java.lang.NullPointerException at com.res.cobol.Main.translate(Main.java:228) at com.res.cobol.Main.execute(Main.java:152) at com.res.cobol.Main.main(Main.java:73) Done in 0s. C:\RES>java -jar RES.jar cobol\MONEYP.CPY RES Cobol 2 Java alpha1.9(08/05/2010) - COPYRIGHT 2009 C:\RES\cobol\MONEYP.CPY Parsing Cobol started for: C:\RES\cobol\MONEYP.CPY com.res.cobol.parser.ParseException: Encountered " <COBOL_WORD> "005000-MONEY "" at line 23, column 8. Was expecting one of: <EOF> "identification" ... at com.res.cobol.parser.CobolParser.generateParseException(CobolParser.java:51349) at com.res.cobol.parser.CobolParser.jj_consume_token(CobolParser.java:51170) at com.res.cobol.parser.CobolParser.CompilationUnit(CobolParser.java:2968) at com.res.cobol.Main.parse(Main.java:205) at com.res.cobol.Main.execute(Main.java:148) at com.res.cobol.Main.main(Main.java:73) java.lang.NullPointerException at com.res.cobol.Main.translate(Main.java:228) at com.res.cobol.Main.execute(Main.java:152) at com.res.cobol.Main.main(Main.java:73) Done in 0s.
-
Dear Author: I have a question: COBOL Fragment: 01 SECLINK-TABLE-POINTER PIC S9(8) COMP VALUE +0. 01 SECLINK-TABLE-PTR REDEFINES SECLINK-TABLE-POINTER USAGE IS POINTER. 01 SECLINK-BR-TABLE-POINTER PIC S9(8) COMP VALUE +0. 01 SECLINK-BR-TABLE-PTR REDEFINES SECLINK-BR-TABLE-POINTER USAGE IS POINTER. 01 SECLINK-RR-TABLE-POINTER PIC S9(8) COMP VALUE +0. 01 SECLINK-RR-TABLE-PTR REDEFINES SECLINK-RR-TABLE-POINTER USAGE IS POINTER. RES Exception: SECLINK-BR-TABLE-POINTER java.util.EmptyStackException at java.util.Stack.peek(Unknown Source) at java.util.Stack.pop(Unknown Source) at com.res.java.translation.engine.CalculateSymbolLength.calculateElemen tLength(CalculateSymbolLength.java:397) at com.res.java.translation.engine.CalculateSymbolLength.visit01Element( CalculateSymbolLength.java:184) at com.res.java.translation.symbol.SymbolTable.visit(SymbolTable.java:36 0) at com.res.java.translation.symbol.SymbolTable.visit(SymbolTable.java:38 6) at com.res.java.translation.engine.CalculateSymbolLength.calculateGroupL ength(CalculateSymbolLength.java:265) at com.res.java.translation.engine.CalculateSymbolLength.visitInnerGroup (CalculateSymbolLength.java:214) at com.res.java.translation.symbol.SymbolTable.visit(SymbolTable.java:36 9) at com.res.java.translation.engine.CobolFillTable.visit(CobolFillTable.j ava:426) at com.res.cobol.syntaxtree.ProcedureDivision.accept(ProcedureDivision.j ava:39) at com.res.cobol.visitor.DepthFirstVisitor.visit(DepthFirstVisitor.java: 30) at com.res.cobol.syntaxtree.NodeOptional.accept(NodeOptional.java:27) at com.res.java.translation.engine.CobolFillTable.visit(CobolFillTable.j ava:142) at com.res.cobol.syntaxtree.ProgramUnit.accept(ProgramUnit.java:35) at com.res.cobol.visitor.DepthFirstVisitor.visit(DepthFirstVisitor.java: 35) at com.res.cobol.syntaxtree.NodeSequence.accept(NodeSequence.java:32) at com.res.cobol.visitor.DepthFirstVisitor.visit(DepthFirstVisitor.java: 25) at com.res.cobol.syntaxtree.NodeListOptional.accept(NodeListOptional.jav a:32) at com.res.cobol.visitor.DepthFirstVisitor.visit(DepthFirstVisitor.java: 603) at com.res.java.translation.engine.CobolFillTable.visit(CobolFillTable.j ava:77) at com.res.cobol.syntaxtree.CompilationUnit.accept(CompilationUnit.java: 34) at com.res.cobol.Main.translate(Main.java:228) at com.res.cobol.Main.execute(Main.java:152) at com.res.cobol.Main.main(Main.java:73) Can the RES surport COBOL POINTER in fact, i am familiar with Java and not familiar with COBOL. I donot know COBOL code wrong or RES code wrong. Best Regards kenny fang YFang@insigmaus.com