z/OS Language Environment Programming Guide for 64-bit Virtual Addressing Mode
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Using C or C++ I/O functions

z/OS Language Environment Programming Guide for 64-bit Virtual Addressing Mode
SA38-0689-00

Runtime messages and perror() messages are directed to the stderr standard stream output device.

Message output issued by a call to the printf() function is directed to stdout.

You can change the destination of printf() output by redirection. For example, 1>&2 on the command line at routine invocation redirects stdout to the stderr destination.

Table 1 lists the possible destinations of redirected stderr and stdout standard stream output.

Table 1. C/C++ redirected stream output
  Stderr not redirected Stderr redirected to destination other than stdout Stderr redirected to stdout
stdout not redirected stdout to itself stdout to itself Both to stdout
stderr to itself stderr to its other destination
stdout redirected to destination other than stderr stdout to its other destination stdout to its other destination Both to the other stdout destination
stderr to itself stderr to its other destination
stdout redirected to stderr Both to stderr Both to the other stderr destination When stderr and stdout are redirected to each other (this is not recommended), output from both is directed to whichever was specified first.

For more information about redirecting standard streams in C or C++, see z/OS XL C/C++ Programming Guide.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014