COBCH1856 Generic method cannot include out-of-line PERFORM

The program contains a generic method that uses an out-of-line PERFORM statement. This is not allowed; however a generic method can use an inline PERFORM statement.

Resolution:

Correct the code; then recompile.

Example:

In the following example, PERFORM S1 is an out-of-line PERFORM statement. The following PERFORM statement is inline and therefore legal.

       class-id a.
       method-id GenericMethod using T (param1 as T).
           perform s1         *> Error
           perform 5 times    *> ok
               display param1
           end-perform
           goback
           .
       s1 section.
           display param1
       end method.
       end class.