CALL "C$NCALLRUN" GIVING threadCount  | 
threadCount   | PIC 9(n)  | Receives the number of threads generated by a CALL RUN statement that are still running  | 
working-storage section. 77 cr-count pic 9(3). ... procedure division. ...   perform test after until cr-count = 0     call "c$ncallrun" giving cr-count     call "c$sleep" using 0.5  end-perform   goback.  |