Interspersing output when COBOL Is the main program

To intersperse output from C++ and COBOL when the main routine is coded in COBOL, compile your COBOL program using the default OUTDD (OUTDD=SYSOUT). In your C++ routine, add a line stdout = stderr. If you have overridden the default MSGFILE ddname, you must compile your COBOL program using an OUTDD ddname that specifies the same name as the MSGFILE.