I was trying to parse below code koopa was failing due to it expecting last line before starting a new paragraph must ends with Dot "."
"." is optional in COBOL before start of the paragraph, so please make it optional.
EXEC something is not part of the COBOL design, it's an extension. And I guess it's not a feature but a bug in the compiler originally used...
So I think it may could be a good idea to fix the sources? In the hope to sound not too harsh: "If I pass a Lorem Ipsum text to Koopa it doesn't recognize COBOL" (some compiler may do this, recognizing all words as paragraph names)...
BTW: For starting a paragraph there must not be any open sentences (and of course a sentence is finished with a dot).
This both works (did not checked if Koopa get's both the section and paragraph name correct in sample two)
[...]CONTINUE.*----------------------------------------------------some-secSECTION.some-par.[...]CONTINUE.*----------------------------------------------------some-secSECTIONsome-par.*> no dot before some-par
Simon
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
From what I know also, a period IS required before starting a new paragraph or section in COBOL grammar. Period is optional for the statements within Paragraphs, EXCEPT FOR the last statement. Quick ref: http://condor.depaul.edu/jpetlick/COBOL02.html - Where a period is required.
Reading few COBOL dialect manuals would be required to re-confirm it. Compiling the code without a period before a Para name would be the quickest way to confirm.
Which COBOL compiler and version r u using?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tried to present sample based on the code which I received from Mainframe.
I just wanted to present the problem here.
I have a working COBOL source which is running on mainframe system, but when I am trying to use koopa to parse that source, it is failing since it doesn't have period in last line before starting a new paragraph.
I think they are using COBOL 2 to compile the code.
Regards
Saurabh
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi KrisDS,
I was trying to parse below code koopa was failing due to it expecting last line before starting a new paragraph must ends with Dot "."
"." is optional in COBOL before start of the paragraph, so please make it optional.
Not working COBOL:
Working COBOL :
Regards
Saurabh
Last edit: Suman Saurabh 2015-01-21
Ugh; sometimes I wonder what people were thinking when designing Cobol...
Could you make a an issue for this in the tracker ? I'm not sure when I'll get the time to fix this. And it will take some time for sure...
EXEC something is not part of the COBOL design, it's an extension. And I guess it's not a feature but a bug in the compiler originally used...
So I think it may could be a good idea to fix the sources? In the hope to sound not too harsh: "If I pass a Lorem Ipsum text to Koopa it doesn't recognize COBOL" (some compiler may do this, recognizing all words as paragraph names)...
BTW: For starting a paragraph there must not be any open sentences (and of course a sentence is finished with a dot).
This both works (did not checked if Koopa get's both the section and paragraph name correct in sample two)
Simon
Saurabh,
From what I know also, a period IS required before starting a new paragraph or section in COBOL grammar. Period is optional for the statements within Paragraphs, EXCEPT FOR the last statement. Quick ref: http://condor.depaul.edu/jpetlick/COBOL02.html - Where a period is required.
Reading few COBOL dialect manuals would be required to re-confirm it. Compiling the code without a period before a Para name would be the quickest way to confirm.
Which COBOL compiler and version r u using?
Hi,
I tried to present sample based on the code which I received from Mainframe.
I just wanted to present the problem here.
I have a working COBOL source which is running on mainframe system, but when I am trying to use koopa to parse that source, it is failing since it doesn't have period in last line before starting a new paragraph.
I think they are using COBOL 2 to compile the code.
Regards
Saurabh