Re: Cobol language dictionary page -- assignment complete?
- From: John Culleton <john@xxxxxxxxxxxxxxxx>
- Date: Thu, 27 Oct 2005 00:09:36 +0000
Chuck Stevens wrote:
> "John Culleton" <john@xxxxxxxxxxxxxxxx> wrote in message
> news:xaudnUUVbZXtesLeRVn-jQ@xxxxxxxxxxxxxxx
>
>> My skeleton compiles on two current flavors of COBOL, OpenCOBOL and
>> TinyCOBOL.
>
> I'm really kind of surprised that neither of your cited compilers seem to
> notice that COBOL itself requires both a SELECT and an FD in order fully
> to
> describe any file: "Each file described in the Data Division must be
> named
> once and only once as file-name in the FILE-CONTROL paragraph. Each file
> sepecified in the file control entry must have a file description entry in
> the Data Division." (ANSI X3.23-1974 page IV-4, 2.1.2.3, The FILE-CONTROL
> paragraph, Syntax Rule 2. The '85 standard echoes this sentiment, as does
> the 2002 standard and the draft proposed for 2008. I even see strong
> evidence that this required correspondence exists in the original COBOL-60
> specification).
>
> What "value add" do these compilers provide by allowing one without the
> other? In other words, what "feature" useful to the end user or to the
> programmer does allowing SELECT without an associated FD represent?
>
> How *should* a compiler diagnose this? Does this skeleton program include
> an extra SELECT statement, or does it have a missing File Description? If
> the shoe were on the other foot -- a FD without an associated SELECT,
> would
> either compiler complain? If so, why? If not, why not?
As it happens one of the compilers (forget which) would complain if the
FILE-CONTROL paragraph was completely empty. My traditional skeleton does
not include either a SELECT or an FD because the skeleton is just a quicker
way to write a program. The usual headers, division, section and paragraph,
are there but not the stuff in between. My template is not an exercise in
theory abut a practical tool I use and have used for decades. You take the
template, copy it to another name, and then start filling in the blanks.
The usual headers are there and are spelled correctly etc.
>> It is possible to be a good COBOL programmer and yet au courant by
>> commenting these paragraphs.
>
> Well, yeah; but I'm a bit at a loss to understand what's "au courant"
> about commenting out a SELECT statement in COBOL of *any* vintage just to
> get the program to compile ...
>
Just consider the purpose, and the limitation of the compiler, as listed
above. I agree that this aberration need not appear in a skeleton to be
used by the engineers. I forgot to delete it.
--
John Culleton
Able Indexers and Typesetters
.
- Follow-Ups:
- Re: Cobol language dictionary page -- assignment complete?
- From: Chuck Stevens
- Re: Cobol language dictionary page -- assignment complete?
- References:
- Cobol language dictionary page
- From: Christine Frayda
- Re: Cobol language dictionary page
- From:
- Re: Cobol language dictionary page -- assignment complete?
- From: Christine Frayda
- Re: Cobol language dictionary page -- assignment complete?
- From: Rick Smith
- Re: Cobol language dictionary page -- assignment complete?
- From: John Culleton
- Re: Cobol language dictionary page -- assignment complete?
- From: Chuck Stevens
- Cobol language dictionary page
- Prev by Date: Re: IMPLIB and LNK1136
- Next by Date: Re: Cobol language dictionary page -- assignment complete?
- Previous by thread: Re: Cobol language dictionary page -- assignment complete?
- Next by thread: Re: Cobol language dictionary page -- assignment complete?
- Index(es):
Relevant Pages
|