Document Number:     J4/02-0253
November 21, 2002  
 
DF-4.1            Page    1  of   2
Defect Report Response DF-4.1 (for 01-0376/138)
Subject: 
Overlapping Operands in RELEASE Statement
Author: 
Charles C. Stevens
Previous Version:
J4/02-0151
http://www.cobolstandard.info/j4020151.htm
 
References in Document: 
1.
ISO/IEC FDIS 1989:2002, Programming language COBOL:
a.
14.5.9, Overlapping operands
b.
14.8.30, RELEASE statement, syntax rule 2
c.
14.8.32, RETURN statement, syntax rule 1
Other References:
 
2.
J4/01-0376 – (D-4) Comments on SC/22 N2304 (FCD 1989)
(Klein/Josling)  
http://www.cobolstandard.info/j4010376.htm
Submitter:
This report was submitted directly to J4 by William M. Klein
(wmklein
@
ix.netcom.com) on behalf of Tim Josling.
Nature of Defect:
Reference 1b:  It may be difficult for the implementor to check, as is required for
syntax errors, that record-name-1 and identifier-1 do not share the same storage
area e.g. if identifier-1 is in linkage or is based.
Solution Proposed by Submitter:
Rule should be changed to say that results are undefined if the areas overlap.  
Document Number:     J4/02-0253
November 21, 2002  
 
DF-4.1            Page    2  of   2
Discussion at Meeting 239:  
Motion to approve the Proposed Response and Changes Needed sections of 02-
0151 as modified, and to request that Mr. Stevens prepare an ISO-format defect
report based on this document.  Passed;  Yes – 7;  No – 0;  Abstain – 0.
Proposed response:  
The implementor cannot detect in all cases whether the operands of a RELEASE
… FROM address the same storage area.  No new rule is needed, however, to
point out that the results are unpredictable in such cases; Reference 1a
adequately provides for that case.  
Changes Needed for Technical Corrigendum::
The following changes to the Standard are needed:
14.8.30, RELEASE statement, delete the second sentence from syntax rule 2.  
14.8.32, RETURN statement, delete syntax rule 1.
F.2, Substantive changes not affecting existing programs:  Add the following
entries:  
112a:  RELEASE statement:  The rule prohibiting record-name-1 and identifer-1
from referencing the same storage area has been deleted.  The results are
undefined, according to the rules for overlapping operands.   
116a:  RETURN statement:  The rule prohibiting the storage area associated with
identifier-1 and the record area associated with file-name-1 from being the same
storage area has been deleted.  The results are undefined, according to the rules
for overlapping operands.