[an error occurred while processing this directive]

HP OpenVMS Systems Documentation

Content starts here

HP COBOL
Reference Manual


Previous Contents Index

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

  1. 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.
  2. next-group-line-num and next-group-line-num-plus must not exceed three significant digits.
  3. 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.
  4. A PAGE FOOTING Report Group must not specify the NEXT PAGE phrase of the NEXT GROUP clause.
  5. A PAGE HEADING and REPORT FOOTING Report Group must not specify the NEXT GROUP clause.

General Rules

  1. Page positioning occurs after the presentation of the Report Group in which the NEXT GROUP clause appears.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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

  1. The subject of the entry is the data-name that contains the OCCURS clause.
  2. 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.
  3. There can be no OCCURS clauses between the data description entries for key-names and the subject of the entry.
  4. In the OCCURS clause of the data description entry, key-name cannot be subscripted or indexed.
  5. 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.
  6. The INDEXED BY phrase implicitly defines ind-name. The program cannot define ind-name elsewhere.
  7. The subject of a Format 2 OCCURS clause can be followed, in the same record description, only by data description entries subordinate to it.
  8. 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)
  9. 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
  10. Each ind-name must be a unique word in the program.
  11. 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.
  12. 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

  1. The OCCURS clause defines tables and provides the basis for subscripting and indexing.
  2. 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.
  3. Format 1 specifies that the subject of the entry has a fixed number of occurrences.
  4. 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.
  5. 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.
  6. 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.
  7. 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

  1. 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.
    
  2. 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.


    Previous Next Contents Index