INVOKE Statement (JVM COBOL)

Invokes a method.

invoke-statement

method-invocation-expression

Example

In the following example, the arguments a and b above are passed to the invoked method, and these correspond to the parameters x and y respectively, in the invoked method. The types of the parameters are specified in the AS phrase in the method signature.

       01 a string.
       01 b binary-long.
       invoke type MyClass::MyMethod(a,b)
       ...

       method-id MyMethod (x as string, y as binary-long).
       ...
       end method.

See also the Core sample, which is available from Start > All Programs > Micro Focus Enterprise Developer > Samples > Visual COBOL Samples, under Language Reference for JVM COBOL.