proleap-cobol-parser icon indicating copy to clipboard operation
proleap-cobol-parser copied to clipboard

Alternative way to include copy books

Open albertolovato opened this issue 7 years ago • 2 comments

In code I'm parsing some copy books are included with EXEC SQL INCLUDE <copybook> END-EXEC instead of COPY <copybook>.

albertolovato avatar Dec 20 '17 16:12 albertolovato

Would it be sufficient to modify the copyStatement definition as follows?

copyStatement : COPY copySource (NEWLINE* (directoryPhrase | familyPhrase | replacingPhrase | SUPPRESS))* NEWLINE* DOT | EXEC SQL INCLUDE copySource END_EXEC NEWLINE* DOT? ; INCLUDE: I N C L U D E;

albertolovato avatar Feb 23 '18 14:02 albertolovato

Yes, that could be an option. The complicated thing with EXEC SQL INCLUDE is to get right, where COBOL ends and SQL begins. I'll have to take a look for that, so that we don't mix COBOL parsing with SQL parsing. I suspect, it belongs to COBOL...

We're having a deadline this week, I'll take a look afterwards.

uwol avatar Feb 27 '18 15:02 uwol