MF 

The OCCURS Clause in the Screen Section

General Format


*

Syntax Rules

  1. The OCCURS clause is not allowed at 01 level.
  2. If USING or TO clauses apply to the item, or to any item subsidiary to the item, then the same number of OCCURS clauses, specifying the same number of occurrences, must apply to the receiving item. These OCCURS clauses must not include the DEPENDING phrase.
  3. If a FROM clause applies to the item, or to any item subsidiary to the item, either the same number of OCCURS clauses, specifying the same number of occurrences, or no OCCURS clauses at all, must apply to the sending item. These OCCURS clauses must not include the DEPENDING phrase.

General Rules

  1. In a screen description which is subject to an OCCURS clause, the LINE and COLUMN clauses apply to each individual table entry. Thus either the LINE or the COLUMN clause should specify relative positioning, because if they both specify an absolute position every entry will appear in the same place.
  2. If the screen item is an output field, and no OCCURS clauses apply to the sending item, in a DISPLAY operation the contents of the sending item are moved to every occurrence of the screen item. An elementary item that is fully subscripted is deemed to have no OCCURS clauses applying to it.
  3. If the screen item is an update field, or it is an output field with OCCURS clauses applying to the sending item, then in a DISPLAY operation the contents of each occurrence of the sending item are moved to the corresponding occurrence of the screen item.
  4. If the screen item is an update or input field, then in an ACCEPT operation the data entered into each occurrence of the screen item is moved to the corresponding occurrence of the receiving item.