RULE 4 - Do not code the CONFIGURATION SECTION if the compiler
allows you to.
One cannot fault the textbook writers too much in this area.
Most compilers have required this SECTION to be coded, IBM compilers
being the exception. However, since this SECTION has been proposed
to be eliminated ever since the initial draft of the COBOL-85
standard in 1980, one might expect that more authors would have
begun to prepare their readers.
Another difficulty is that most colleges do not have access
to large IBM mainframes and compilers, so the authors are forced
to deal with an audience which may have a diverse set of environments.
This is evident in such quotations as: "Your instructor
will give you the exact entries you need for the Configuration
Section in your programs."1
However, an early textbook, written in 1974 noted even then
that "This section is required in ANSI COBOL, but is optional
in IBM and WATBOL version."2 If this
author could insert that statement in 1974, why have others insisted
that the entries be coded?
Another author, in 1978, makes the statement that "these
clauses are optional and may be treated as comments by your particular
COBOL compiler. ... However, these options contain information
for which many a maintenance programmer is thankful when he is
responsible for changing the code in an alien program ... So,
follow your organizations COBOL standards."3
Of those textbooks analyzed, only two which were written in
1988 and 1989 referenced the COBOL-85 standards and indicated
that these paragraphs were optional.4,5
Finally, another author probably just ended up confusing the
issue altogether when as the only example of the CONFIGURATION
SECTION, he coded:6
SOURCE-COMPUTER. IBM.
OBJECT-COMPUTER. BURROUGHS.
Although many compilers may have accepted this type of entry
since they treat the paragraphs as comments, there is no known
COBOL compiler that will execute on an IBM computer and produce
object code that will execute on a Burroughs computer. It is
no wonder that some students are confused when they have to learn
COBOL.
RULE 5 - Assign files to an external name only, without all
the device dependent information.
COBOL textbooks appear to take one of several tracks when
describing the SELECT ... ASSIGN statement. Some take a complete
generic approach and simply state "consult your COBOL reference
materials to obtain the appropriate implementor-names."7
Others use generic names such as "READER" and "PRINTER"
with no explanation.8 Many use the IBM format
of the implementor-name, but often without explanation, and generally
without any reference to the fact that later IBM compilers also
permit the simpler form of the name.
Thus one text mentions "SYS001-UT-3340-S" and "UT-S-PAYROLL"
as the "extensive" and "simpler" external
names available in IBM compilers.9 Another
mentions "SYS005-UR-2540R-S" as an implementor name
for IBM-370.10 Another listed sample device
designations for IBM, Honeywell, CDC, Univac, DEC, Burroughs,
etc., but again gave no mention of simpler names being available.11
The major point here is that not a single textbook author
seemed to be aware that IBM compiler now also allows the simple
"CUSTFILE" type of implementor names that many other
manufacturers have always allowed. Thus students are often misled
into thinking that they have to use these strange multi-part names
when using IBM compilers.
1 - Gary Popkin. Comprehensive Structured COBOL. 5.
2 - Fritz McCameron. COBOL Logic and Programming. 40.
3 - Timothy R. Lister and Edward Yourdon. Learning to Program in Structured COBOL, Part 2. 129.
4 - Edward Coburn. Advanced Structured COBOL. 38-39.
5 - Gerard Paquette. Structured COBOL. 104.
6 - Michel Boillet and Mona Boillet. Understanding Structured COBOL. 62.
7 - Tyler Welburn. Structured COBOL, Fundamentals and Style. 66.
8 - Michel Boillet. 46.
9 - Edward Coburn. 39.
10- Gerard Paquette. 105.
11- J. Wayne Spence. COBOL for the 80's. 48.