***********************************
      * Program name: occurs.cbl
      * Demonstrates OCCURS clause
      * usage for clauses supported
      * in CobolScript Standard Edition;
      * see profoccr.cbl for Professional
      * Edition OCCURS clause samples.
      *
      * Copyright 2000 Deskware, Inc.
      ***********************************
       1  occurs_gldi occurs 5 times.
         5 occurs_var_1 pic 99 value 5.
         5 gldi.
          10 eldi_1 pic 9 value 1.
          10 eldi_2 pic 9 value 2.
         5 occurs_var_2 pic x value `q`.

       1  occurs_var_3 occurs 5 times pic 99 value 5.

       DISPLAY `occurs_var_1(1) before move = ` & occurs_var_1(1).
       MOVE 1 to occurs_var_1(1).
       DISPLAY `occurs_var_1(1) after move = ` & occurs_var_1(1).
       DISPLAY `occurs_var_1(5) = ` & occurs_var_1(2+3).
       DISPLAY `occurs_var_3(5) = ` & occurs_var_3( eldi_1(1) + eldi_2(1) + eldi_2(2) ).
       DISPLAY `occurs_gldi = ` & occurs_gldi.
       GOBACK.