Rational Developer for System z
Enterprise COBOL for z/OS, Version 4.1, Programming Guide


Choosing THREAD to support multithreading

Use the THREAD compiler option for multithreading support. Use THREAD if your program will be called in more than one thread in a single process by an application. However, THREAD might adversely affect performance because of the serialization logic that is automatically generated.

In order to run COBOL programs in more than one thread, you must compile all of the COBOL programs in the run unit with the THREAD compiler option. You must also compile them with the RENT compiler option and link them with the RENT option of the binder or linkage editor.

Use the THREAD option when you compile object-oriented (OO) clients and classes.

Language restrictions: When you use the THREAD option, you cannot use certain language elements. For details, see the related reference below.

Recursion: Before you compile a program with the THREAD compiler option, you must specify the RECURSIVE phrase in the PROGRAM-ID paragraph. If you do not do so, an error will occur.

related references  
THREAD


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)