COBCH1676 Anonymous method code cannot include GO TO or out-of-line PERFORM

The code for an anonymous method includes an out-of-line perform statement or a GO TO statement.

In the example below, you must remove the PERFORM and the GO TO statements from the delegate declaration.

Note: In-line PERFORM statements are permitted.
class-id MyClass.
method-id main static.
01 del type MyDelegate.
set del to delegate
    perform s1           *> must be removed
    go to exit-para      *> must be removed
end-delegate
goback.
s1 section.
display "Start".
s2 section.
exit-para.
 goback.
end method.
end class.
delegate-id MyDelegate.
end delegate.