COBCH1863 ILSMARTLINKAGE cannot be used with complex variable length groups, which do not contain the OCCURS DEPENDING ON item

The program contains ILSMARTLINKAGE that uses a complex variable-length group (this could be a group containing multiple OCCURS DEPENDING ON items, or in which the OCCURS DEPENDING ITEM is not the last item at its level within the group), and the object of the OCCURS DEPENDING ON is not itself part of the group, and when the program is compiled with the ODOSLIDE directive. This is not allowed.

Resolution:

Correct the code and recompile as before, or recompile without the ODOSLIDE directive.

Example:

In the following example, the $SET statement includes ODOSLIDE, which causes this error to be thrown when coupled with the multiple OCCURS DEPENDING ON syntax shown.

      $set ilsmartlinkage odoslide
       working-storage section.
       01 i1 binary-long value 3.
       01 i2 binary-long value 4.
       linkage section.
       01 l1.
           03 x1 pic x(10) occurs 1 to 10 depending on i1.
           03 x2 pic x(10) occurs 1 to 10 depending on i2.
       procedure division using l1.
           display l1