Common blocks in a PL/I multitasking application

In a PL/I multitasking application, Fortran dynamic common blocks are always maintained for the whole enclave, even though subtasks that use them can start and end.

Fortran static common blocks persist only as long as the load module that contains them is in storage. When a load module is loaded from within a subtask, Fortran common blocks persist only within that subtask because the load module is deleted when the task ends. If, in a later subtask, the same load module is loaded, a fresh copy is loaded with fresh contents of the common block.

If, however, the load module is loaded in the main task (with the FETCH statement), and is also specified in a CALL statement to run a subtask, the load module (and the Fortran common blocks) is retained in storage after the subtask ends. The same copy of the load module can be used in another CALL statement to create another subtask, with the same contents of the common block. The following code illustrates this method:
FETCH ABC;
CALL ABC (...) TASK;