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

Re: [GNU-COBOL] Procedure Division Format Question



Thus far, I haven't seen, among the responses to your query, an
authoritative citation, so I will reluctantly don the lawyerly mantle,
but only momentarily.  The applicable passage is in paragraph
6.4.1.2, which says in part:

  If one paragraph is in a section, all paragraphs must be in
  sections. 

That said, I still strongly recommend being permissive on this
point.  Trying to convince a user, whose program has been compiling
successfully on a succession of compilers for fifteen years, that his
program is in violation of the standard, is a singularly
unsatisfactory experience.

Mike


>>>>> "Laura" == Laura Tweedy <ltweedy@bellatlantic.net>
>>>>> wrote the following on Fri, 16 Jul 1999 19:21:43 -0400

  Laura> Cobol Gurus!  The standard claims the following are both
  Laura> valid format for the procedure division:

  Laura> Format 1: PROCEDURE DIVISION.  { section-name SECTION.  [
  Laura> paragraph-name.  [sentence]... ]... }...

  Laura> Format 2: PROCEDURE DIVISION.  { paragraph-name.
  Laura> [sentence]... }...

  Laura> I read this as meaning that IF you're going to have
  Laura> sections, the first thing in the Procedure division MUST be
  Laura> a section line.  And, that IF the first thing you have is a
  Laura> paragraph, you can not have section definitions later.

  Laura> Is this right?  By that I mean, do most compilers enforce
  Laura> this?  Is it enforced at all?  What does the section
  Laura> definition mean here?  I can't find a description of what
  Laura> declaring sections in the procedure division gets you.

  Laura> For those of you with a standard, the above appears on page
  Laura> VI-51.

  Laura> laura -- Laura Tweedy .. ltweedy@bellatlantic.net




--
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.