Directing output in ILC applications

Language Environment does not provide support to coordinate the use of most C++ and Fortran files; however they can share the Language Environment message file which is the ddname specified in the Language Environment MSGFILE runtime option. You must manage all other files to ensure that no conflicts arise. For example, performing output operations on the same ddname is likely to cause unpredictable results.

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 Fortran PRINT 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.

Fortran runtime messages, output written to the print unit, and other output (such as output from the SDUMP callable service) are directed to the file specified by the MSGFILE runtime option. To direct this output to the file with the ddname FTnnF001, (where nn is the two-digit error message unit number), specify the runtime option MSGFILE(FTnnF001). If the print unit is different than the error message unit (if the PRTUNIT and the ERRUNIT runtime options have different values), output from a PRINT statement won't be directed to the Language Environment message file.