  | 
		
HP COBOL Reference Manual
 
 
5.3.33 LOWLIGHT (Alpha, I64)
Function
 
 
The LOWLIGHT clause specifies that the field is to appear on the screen
with the lowest intensity. When only two levels of intensity are
available, normal intensity and LOWLIGHT will be the same.
  
 
Syntax Rule
 
 
The LOWLIGHT clause can be specified only for an elementary screen
description entry.
 
Additional Reference
 
 
5.3.34 NEXT GROUP
Function
 
 
The NEXT GROUP clause specifies information for the vertical
positioning of the next report group on a logical page following the
presentation of the last line of a report group.
  
 
next-group-line-num
is a positive, 1- to 3-digit integer value greater than zero. It
represents an absolute line number on a logical page and establishes a
print line for the next Report Writer report group.
next-group-line-num-plus
is a positive, 1- to 3-digit integer value. It represents a relative
line number on a logical page and establishes a print line for the next
Report Writer report group.
 
Syntax Rules
 
 
  - A Report Group entry must not contain a NEXT GROUP clause unless
  the description of that Report Group contains at least one LINE NUMBER
  clause.
  
 - next-group-line-num and next-group-line-num-plus
  must not exceed three significant digits.
  
 - If a Report Description entry omits the PAGE clause, all Report
  Group Description entries within that report can specify a relative
  NEXT GROUP clause only.
  
 - A PAGE FOOTING Report Group must not specify the NEXT PAGE phrase
  of the NEXT GROUP clause.
  
 - A PAGE HEADING and REPORT FOOTING Report Group must not specify the
  NEXT GROUP clause.
  
General Rules
 
 
  - Page positioning occurs after the presentation of the Report Group
  in which the NEXT GROUP clause appears.
  
 - To determine a new value for LINE-COUNTER, the Report Writer
  Control System (RWCS) uses the vertical positioning information from
  the NEXT GROUP clause along with information from the TYPE and PAGE
  clauses, and the value in LINE-COUNTER. See Appendix D, Report Writer Presentation Rules and Tables.
  
 - The RWCS ignores the NEXT GROUP clause on a CONTROL FOOTING Report
  group when it detects a control break at a level other than the highest
  level.
  
 - The NEXT GROUP clause of a CONTROL HEADING, DETAIL, and CONTROL
  FOOTING report group refers to the next CONTROL HEADING, DETAIL, and
  CONTROL FOOTING to be presented, and therefore can affect the location
  at which the next CONTROL HEADING, DETAIL, and CONTROL FOOTING report
  group is presented. See Appendix D.
  
 - The NEXT GROUP clause of a REPORT HEADING report group can affect
  the location at which the PAGE HEADING report group is presented. See
  Appendix D.
  
 - The NEXT GROUP clause of a PAGE FOOTING report group can affect the
  location at which the REPORT FOOTING report group is presented. See
  Appendix D.
  
Additional References
 
 
5.3.35 OCCURS
Function
 
 
The OCCURS clause defines tables and provides the basis for
subscripting and
indexing. It eliminates the need for separate entries for repeated data
items.
  
 
table-size
is an integer that specifies the exact number of occurrences of a table
element.
min-times
is an integer that specifies the minimum number of occurrences of a
table element. Its value must be greater than or equal to zero.
max-times
is an integer that specifies the maximum number of occurrences of a
table element. Its value must be greater than min-times.
key-name
is the data-name of an entry that contains the OCCURS clause or an
entry subordinate to it. key-name can be qualified. Each
key-name after the first must name an entry subordinate to the
entry that contains the OCCURS clause. The values in each
key-name are the basis of the ascending or descending
arrangement of the table's repeated data.
ind-name
is an index-name. It associates an index with the table and allows
indexing in table element references.
depending-item
is the data-name of an elementary unsigned integer data item. Its value
specifies the current number of occurrences. depending-item
can be qualified.
 
Syntax Rules
 
 
  - The subject of the entry is the data-name that contains the OCCURS
  clause.
  
 - A key-name cannot contain an OCCURS clause. However, this
  rule does not apply to the first key-name if it is the subject
  of the entry.
  
 - There can be no OCCURS clauses between the data description entries
  for key-names and the subject of the entry.
  
 - In the OCCURS clause of the data description entry,
  key-name cannot be subscripted or indexed.
  
 - There must be an INDEXED BY phrase if any Procedure Division
  statements
contain indexed references to the subject of the entry or to any of its
subordinates.
  
 - The INDEXED BY phrase implicitly defines ind-name. The
  program cannot define ind-name elsewhere.
  
 - The subject of a Format 2 OCCURS clause can be followed, in the
  same record description, only by data description entries subordinate
  to it.
  
 - The OCCURS clause cannot be used in a data description entry that
  has the following:
  
    - A level-number of 01, 66, 77, or 88
    
 - A subordinate variable occurrence data item (Format 2 OCCURS clause)
  
  
   - The data item defined by depending-item cannot occupy any
  character position in the range delimited by the following:
  
    - The character position defined by the subject of the OCCURS clause
    
 - The last character position defined by the record description entry
    containing the OCCURS clause
  
  
   - Each ind-name must be a unique word in the program.
  
 - If the OCCURS clause is in a record description entry containing
  the GLOBAL clause, depending-item must refer to a global item
  described in the same Data Division.
  
 - If the OCCURS clause is in a record description entry containing
  the EXTERNAL clause, depending-item must refer to an external
  item described in the same Data Division.
  
General Rules
 
 
  - The OCCURS clause defines tables and provides the basis for
  subscripting and indexing.
  
 - Except for the OCCURS clause itself, all data description clauses
  associated with the subject of the OCCURS clause apply to each
  occurrence of the item.
  
 - Format 1 specifies that the subject of the entry has a fixed number
  of occurrences.
  
 - Format 2 specifies that the subject of the entry has a variable
  number of occurrences. min-times and max-times
  specify the minimum and maximum number of occurrences. Only the number
  of the subject's occurrences is variable; its size is fixed. 
 The
  value of depending-item must fall in the range
  min-times to max-times.  The contents of data
  items with occurrence numbers exceeding the current value of
  depending-item are unpredictable.
   - If a group item with a subordinate entry that has a Format 2 OCCURS
  clause is a sending item, the operation uses only the part of the table
  area specified by depending-item at the start of the
  operation. 
 If the group is a receiving item, the part of the table
  used is determined by the location of depending-item. If
  depending-item is included in the group, then the operation
  uses the maximum length of the group. If depending-item is not
  included in the group, then the operation uses only the part of the
  table area specified by depending-item.
   - The KEY IS phrase indicates that the repeated data is arranged in
  ascending or descending order according to the values in the data items
  named by key-name. The rules for operand comparison determine
  the ascending or descending order. The position of each
  key-name in the list determines its significance. The first is
  the most significant, and the last is least significant.
  
 - If a Format 2 OCCURS clause is in a record description entry and
  the associated file description entry has the VARYING phrase of the
  RECORD clause, the records are variable length. 
 If the RECORD
  clause does not have the DEPENDING ON phrase, the program must set the
  OCCURS clause depending-item to the number of occurrences
  before executing a RELEASE, REWRITE, or WRITE statement. The
  depending-item value determines the length of the record to be
  written.
  
Technical Note
 
 
If the subject of the OCCURS clause (or any of its subordinates) has
the SYNCHRONIZED clause, the length of the subject of the OCCURS
clause, or the group containing it, could increase. SYNCHRONIZED clause
alignment can add fill bytes to the group containing the subject of the
OCCURS clause and to the subject itself.
 
Additional References
 
 
Examples
 
 
  - One-dimensional table: 
 This record description entry describes
  a 20-character record. The record contains 10 occurrences of ITEMB, a
  2-character data item.
 
  
    
       
      
01 ITEMA.
   03 ITEMB OCCURS 10 TIMES PIC XX.
 
 |   
   - Two-dimensional table: 
 This record description entry describes
  a 320-character record. The record contains 8 occurrences of ITEMB, a
  40-character data item. ITEMB contains 10 occurrences of ITEMC, a
  4-character data item. Each ITEMC contains 2 data items: ITEMD and
  ITEME.
  
  
		   |