J4/02-0145
July 15, 2002
 
Page  
  of
Subject: 
 
(D-4) Overlapping Operands and OCCURS Format 3
Author: 
 
Charles C. Stevens
References:
 
1.  FDIS, Page 307-308, OCCURS Clause
2.
J4/01-0376/138 (Klein/Josling)
http://www.cobolstandard.info/j4010376.htm
Discussion
Reference 1 states, in SR23:  “The value of integer-3 shall be sufficient to prevent the overlapping of
any line (in the case of vertical repetition) or column (in the case of horizontal repetition) of any two
consecutive repetitions of the associated report item.”  
Reference 2 states regarding this rule:  “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 eg if
identifier-1 is in linkage or is based.”  The recommended response in that document is “Rule should be
changed to say that results are undefined if the areas overlap.”
Reply:  
Syntax Rule 23 applies only to Format 3 of the OCCURS clause, which in turn is applicable only to
items in the REPORT SECTION.  This is indicated by the headingat the bottom of Page 307 of
Reference 1.  
Thus, an item with a Format 3 OCCURS clause cannot be in the LINKAGE SECTION.  
The item also cannot be a BASED data item because the general format for a report group description
entry does not allow the BASED clause in that context.
Syntax Rule 23 applies only when the item (or an item subordinate to it) contains a LINE or a
COLUMN clause, and the STEP phrase is included in the OCCURS clause.  
The size of the data item is known at compile time, with or without the STEP phrase.  If that size is
greater than integer-1, it is possible to determine at compile time whether the STEP phrase will cause
vertical or horizontal overlap.  It is unnecessary for the rules to state that the results are undefined if
this rule is violated at execution time precisely because it is possible to detect a violation of this rule at
compilation time.  
J4 does not believe a correction is needed in this case.  
RESOLVED ISSUES:  None.
OPEN ISSUES:   None.   
X:\J4\02-0145.DOC
Last printed 2/27/2003 6:11 PM