I have had problems with the COBOL preprocessor. I keep getting errors while testing.
Below is a sample.
peter@peterspc:~/exercism/cobol/collatz-conjecture$ bash test.sh
CobolCheck: INFO 2026-04-02T18:52:13.819916Z INF001: Attempting to load config from config.properties.
CobolCheck: INFO 2026-04-02T18:52:13.825289Z INF002: Loaded config successfully from config.properties.
CobolCheck: INFO 2026-04-02T18:52:13.825364Z INF003: Cobol-Check starting
CobolCheck: INFO 2026-04-02T18:52:13.825397Z INF005: Log level is INFO.
CobolCheck: INFO 2026-04-02T18:52:13.825412Z INF006: Configuration settings: production.
CobolCheck: INFO 2026-04-02T18:52:13.849964Z INF014: Error log for the test suite parser is set to: /home/peter/exercism/cobol/collatz-conjecture/ParserErrorLog.txt.
CobolCheck: INFO 2026-04-02T18:52:13.854835Z INF013: Output for generated COBOL test program is set to: /home/peter/exercism/cobol/collatz-conjecture/test.cob.
SYNTAX ERROR in file: : /home/peter/exercism/cobol/collatz-conjecture/tst/collatz-conjecture/collatz-conjecture.cut
Unexpected token on line 3, index 1:
Following
Expected [alphanumeric-literal, numeric-literal, boolean-value, fieldname, EXPECT, cobol-token, TESTSUITE, TESTCASE, MOCK, END-MOCK, VERIFY, parenthesis-enclosed, >, <, NOT, =, >=, <=, TIME, TIMES]
Got
SYNTAX ERROR in file: : /home/peter/exercism/cobol/collatz-conjecture/tst/collatz-conjecture/collatz-conjecture.cut
Unexpected token on line 7, index 1:
Following
Expected [AFTER EACH, AFTER-EACH, TESTSUITE, TESTCASE, MOCK]
Got
Exception in thread "main" org.openmainframeproject.cobolcheck.exceptions.PossibleInternalLogicErrorException: org.openmainframeproject.cobolcheck.exceptions.TestSuiteSyntaxException: The test suite(s) contained one or more errors. See the error log for more details
at org.openmainframeproject.cobolcheck.workers.Generator.mergeTestSuite(Generator.java:105)
at org.openmainframeproject.cobolcheck.workers.Generator.prepareAndRunMerge(Generator.java:75)
at org.openmainframeproject.cobolcheck.Main.main(Main.java:23)
Caused by: org.openmainframeproject.cobolcheck.exceptions.TestSuiteSyntaxException: The test suite(s) contained one or more errors. See the error log for more details
at org.openmainframeproject.cobolcheck.features.testSuiteParser.TestSuiteParser.getParsedTestSuiteLines(TestSuiteParser.java:694)
at org.openmainframeproject.cobolcheck.features.testSuiteParser.TestSuiteParserController.parseTestSuites(TestSuiteParserController.java:101)
at org.openmainframeproject.cobolcheck.workers.Generator.processingBeforeEchoingSourceLineToOutput(Generator.java:130)
at org.openmainframeproject.cobolcheck.workers.Generator.mergeTestSuite(Generator.java:92)
... 2 more
COMPILE AND RUN TEST
test.cob:1: error: PROGRAM-ID header missing
I have had problems with the COBOL preprocessor. I keep getting errors while testing.
Below is a sample.
peter@peterspc:~/exercism/cobol/collatz-conjecture$ bash test.sh
CobolCheck: INFO 2026-04-02T18:52:13.819916Z INF001: Attempting to load config from config.properties.
CobolCheck: INFO 2026-04-02T18:52:13.825289Z INF002: Loaded config successfully from config.properties.
CobolCheck: INFO 2026-04-02T18:52:13.825364Z INF003: Cobol-Check starting
CobolCheck: INFO 2026-04-02T18:52:13.825397Z INF005: Log level is INFO.
CobolCheck: INFO 2026-04-02T18:52:13.825412Z INF006: Configuration settings: production.
CobolCheck: INFO 2026-04-02T18:52:13.849964Z INF014: Error log for the test suite parser is set to: /home/peter/exercism/cobol/collatz-conjecture/ParserErrorLog.txt.
CobolCheck: INFO 2026-04-02T18:52:13.854835Z INF013: Output for generated COBOL test program is set to: /home/peter/exercism/cobol/collatz-conjecture/test.cob.
SYNTAX ERROR in file: : /home/peter/exercism/cobol/collatz-conjecture/tst/collatz-conjecture/collatz-conjecture.cut
Unexpected token on line 3, index 1:
Following
Expected [alphanumeric-literal, numeric-literal, boolean-value, fieldname, EXPECT, cobol-token, TESTSUITE, TESTCASE, MOCK, END-MOCK, VERIFY, parenthesis-enclosed, >, <, NOT, =, >=, <=, TIME, TIMES]
Got
SYNTAX ERROR in file: : /home/peter/exercism/cobol/collatz-conjecture/tst/collatz-conjecture/collatz-conjecture.cut
Unexpected token on line 7, index 1:
Following
Expected [AFTER EACH, AFTER-EACH, TESTSUITE, TESTCASE, MOCK]
Got
Exception in thread "main" org.openmainframeproject.cobolcheck.exceptions.PossibleInternalLogicErrorException: org.openmainframeproject.cobolcheck.exceptions.TestSuiteSyntaxException: The test suite(s) contained one or more errors. See the error log for more details
at org.openmainframeproject.cobolcheck.workers.Generator.mergeTestSuite(Generator.java:105)
at org.openmainframeproject.cobolcheck.workers.Generator.prepareAndRunMerge(Generator.java:75)
at org.openmainframeproject.cobolcheck.Main.main(Main.java:23)
Caused by: org.openmainframeproject.cobolcheck.exceptions.TestSuiteSyntaxException: The test suite(s) contained one or more errors. See the error log for more details
at org.openmainframeproject.cobolcheck.features.testSuiteParser.TestSuiteParser.getParsedTestSuiteLines(TestSuiteParser.java:694)
at org.openmainframeproject.cobolcheck.features.testSuiteParser.TestSuiteParserController.parseTestSuites(TestSuiteParserController.java:101)
at org.openmainframeproject.cobolcheck.workers.Generator.processingBeforeEchoingSourceLineToOutput(Generator.java:130)
at org.openmainframeproject.cobolcheck.workers.Generator.mergeTestSuite(Generator.java:92)
... 2 more
COMPILE AND RUN TEST
test.cob:1: error: PROGRAM-ID header missing