J4/03-0038
D-13 Page 1 of 2
Defect tracking document D-13
Subject:
SET id TO class-name
Author:
Ann Bennettt
Date:
January 24, 2003
Previous version:
None
References in ISO/IEC 1989:2002 - Programming language COBOL:
1.
Page 519, 14.8.35.2, SET statement, syntax rule 13
Other references:
1.
J4/02-0229, SET id TO class-name (Schricker)
Submitter:
Don Schricker
Defect:
Consider the example:
1 id-3d usage object reference factory class1 only
*> class2 inherits from class1
set id-3d to class2 *> ok ?
Class2 is a subclass of the class mentioned in id-3ds description. But we have the ONLY clause.
It just seems to me after reading the previous rules which go into detail about every combination, with FACTORY
and ONLY. This one rule, SET statement syntax rule 13 for covering the case where class-name-1 is used,
misses a rule which should say something along the lines of
If the data item referenced by identifier-3 is described with the ONLY phrase, class-name-1 shall match
the same class specified in the description of the data item referenced by identifier-3.
Solution proposed by submittor:
See above
Proposed response:
There is an omission in SET statement format 3 rules for setting identifier-3 when a class-name is
specified in the TO phrase. The rules do not address the case of an identifier-3 described with an
ONLY phrase.
X:\J4\03-0038.doc
Last printed 3/1/2003
6:56
PM
J4/03-0038
D-13 Page 2 of 2
Changes needed in technical corrigendum:
[Author's note: changed text is in italics. It will be changed to normal text for the technical
corrigendum.]
]
Page 519, 14.8.35.2, SET statement, syntax rule 13, replace with the following:
"If class-name-1 is specified and the data item referenced by identifier-3 is described with a class-name, that data
item shall be described with the FACTORY phrase and
a) if the data item referenced by identifier-3 is described with the ONLY phrase, class-name-1 shall match the
class-name specified in the description of the data item referenced by identifier-3;
b) otherwise,
class-name-1 shall reference the same class or a subclass of the class specified in the description
of the data item referenced by identifier-3.
X:\J4\03-0038.doc
Last printed 3/1/2003
6:56
PM