Re: Cobol language dictionary page -- assignment complete?



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
.



Relevant Pages

  • Re: To Dashwood
    ... Code has migrated, over many years and several compilers, is now used ... with MicroFocus for Unix v3.1 rev 060 and Fujitsu NetCOBOL for Linux ... The system consists of a mixture of C and COBOL. ...
    (comp.lang.cobol)
  • Re: Cobol language dictionary page -- assignment complete?
    ... format for the FILE-CONTROL paragraph in the standards. ... > My traditional skeleton does ... > template, copy it to another name, and then start filling in the blanks. ... with all of our current and past COBOL compilers, ...
    (comp.lang.cobol)
  • Re: If you were inventing CoBOL...
    ... >paragraph at the beginning of the Procedure Division. ... >Some, not all, compilers didn't require this - but flagged it as an extension ... >> Cobol doesn't require a paragraph name after the PROCEDURE DIVISION ...
    (comp.lang.cobol)
  • Re: IBM S/390 memory model and COBOL
    ... I have been told that the earliest COBOL compilers created Assembler Language, rather than object code. ... the letter designations were intended to specify the minimum storage required to run the ...
    (comp.lang.cobol)
  • Re: Supress Option List
    ... > This is my memory / knowledge on the subject of IBM COBOL compilers: ... > written in COBOL, so I had to learn that on my own. ... > compilers IBM offered that conformed to the 1968 ANSI COBOL Standard. ...
    (comp.lang.cobol)