Some COBOL applications depend on subsystems or other applications. In a multithreaded environment, these dependencies and others result in some limitations on COBOL programs.
In general, you must synchronize access to resources that are visible to the application within a run unit. Exceptions to this requirement are DISPLAY and ACCEPT, which you can use from multiple threads; all synchronization is provided for these by the runtime environment.
DB2: You can run a DB2 application in multiple threads. However, you must provide any needed synchronization for accessing DB2 data.
SORT and MERGE: SORT and MERGE should be active in only one thread at a time. However, the COBOL runtime environment does not enforce this restriction. The application must therefore do so.
related tasks
Making recursive calls