Previous Topic Next topic Print topic


Adding Parameters Using ParameterList()

Restriction: This applies to native code only.

The ParameterList() class in com.microfocus.cobol.lang helps with coding parameters being passed between Java and COBOL.

The general mechanism for using ParameterList() is:

   RuntimeSystem.cobcall("myProgram", 
    new ParameterList()
        .add(myOneInt,RuntimeSystem.BY_VALUE)
        .add(mySecondParameter,RuntimeSystem.BY_REFERENCE)
	       .add(99)		// 99 by reference
	       );

Where the parameters are:

myProgram
The program being called.
myOneInt
An integer parameter being passed by value.
mySecondParameter
A parameter being passed by reference.
99
A numeric value being passed by reference.
Previous Topic Next topic Print topic