[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GNU-COBOL] Procedure Division Format Question



Fred Mobach wrote:
> 
> Fred Mobach wrote:
> 
> > Laura Tweedy wrote:
> >
> > > Cobol Gurus!
> > >
> > > The standard claims the following are both valid format for the
> > > procedure division:
> > >
> > > Format 1:
> > > PROCEDURE DIVISION.
> > > { section-name SECTION.
> > > [ paragraph-name.
> > >         [sentence]... ]... }...
> > >
> > > Format 2:
> > > PROCEDURE DIVISION.
> > > { paragraph-name.
> > >         [sentence]... }...
> 
...
> GOTO EOS.
...
> EOS.
>     EXIT.
> 

I used to use this all the time as a kind of 'exit procedure',
but I found that some compilers fell over once you got a huge
number of paras with the same name eg you got a branch to the
wrong EOS!

In terms of how the procedure division starts, I have seen code
that starts with paragraphs and then later sections appear. IBM's
SQL preprocessor used to generate such code at the start of the
procedure division for example. I would try and accommodate this
sort of thing (with a warning); as suggested you put am implicit
fake section name at the start of the procedure division just in
case.

Does anyone have any performance info on PC cobol compilers? How
high is the bar we are aiming for?

Tim Josling

--
This message was sent through the gnu-cobol mailing list.  To remove yourself
from this mailing list, send a message to majordomo@acm.cs.umr.edu with the
words "unsubscribe gnu-cobol" in the message body.  For more information on
the GNU COBOL project, send mail to gnu-cobol-owner@acm.cs.umr.edu.