Another way to invoke a C program from COBOL is via the operating system command line using the C$SYSTEM library routine. This routine combines the functionality of SYSTEM and C$RUN.
To call a C program from COBOL via C$SYSTEM, you:
Note that you can call C$RUN instead of C$SYSTEM to run the command asynchronously.
C$SYSTEM and C$RUN for complete information on these library routines.