Multi-threading Considerations

Restriction: This applies to native code only.

Java run-time systems are multi-threaded, so any COBOL program you are going to use with Java must be linked with the COBOL multi-threaded run-time system whether or not the Java program calling it uses multi-threading. If your COBOL program is called from a multi-threaded Java program, you need to take care that COBOL data accessed from one thread is not corrupted by another thread.

There are several ways you can deal with this:

Alternatively, consider using the CobolBean interface, which associates a COBOL programs working storage with a instance of a CobolBean class.