Menu

#95 COBOL copybook

v1.0 (example)
open
nobody
None
5
2021-02-03
2021-02-03
Saravanan
No

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" ...</eof>

    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" ...</eof></cobol_word>

    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.

1 Attachments

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.