Adding Parameters Using ParameterList()

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 Tthe 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.