Directing output in ILC applications

C and COBOL do not share files, except the Language Environment message file (the ddname specified in the Language Environment MSGFILE runtime option). You must manage all other files to ensure that no conflicts arise. Performing I/O operations on the same ddname might cause abnormal termination.

Under C, runtime messages and other related output are directed to the default MSGFILE ddname. stderr output is also by default directed to the MSGFILE ddname. stdout is not by default directed to the MSGFILE ddname, but can be redirected to do so. Also, output from printf can be interspersed with output from the COBOL DISPLAY statement and output from Language Environment by redirecting stdout to stderr (for example, passing 1>&2 as a command-line parameter).

For more information about how to redirect C output, see z/OS XL C/C++ Programming Guide.

Under COBOL, runtime messages and other related output are directed to the MSGFILE ddname. Output from COBOL DISPLAY UPON SYSOUT is directed to the default MSGFILE ddname only when the OUTDD compiler option ddname matches the MSGFILE ddname; this applies to Enterprise COBOL for z/OS, COBOL for OS/390 & VM, COBOL for MVS & VM, COBOL/370, and VS COBOL II.