Passing Data from COBOL to C
When calling C DLL functions from within COBOL, the method by which
parameters are passed from the COBOL program must carefully match
the data types of each of the parameters in the prototype for the
receiving C function. This is necessary in order to avoid problems
such as abnormal termination. The general rule is that if a C function
receives an argument that is not a pointer, it should be passed from
COBOL using the BY VALUE
phrase. If the argument is a pointer,
it should be passed using the BY REFERENCE
phrase.