COBCH1980 Location of DYNAMIC LENGTH item cannot be affected by prior OCCURS DEPENDING item

A DYNAMIC LENGTH item follows an OCCURS DEPENDING ON group whilst the ODOSLIDE directive is in effect.

Dynamic items cannot be set following a table that may vary in size whilst the ODOSLIDE directive is in effect, as the moving of allocated memory for the dynamic item that may occur depending on table size is not permitted. In the following example, you must either move or remove the dynamic item, or remove the ODOSLIDE directive.

      $SET ODOSLIDE
       1 dpd1 PIC 9(9) COMP.
       1 grp1.
         03 a1 OCCURS 1 TO 10 DEPENDING ON dpd1 PIC X.
         03 d1 PIC X DYNAMIC.