View Output to Standard Streams from PM Programs (OS/2)

To send output from a IBM C and C++ Compilers application directly to a Presentation Manager (PM) window, you must use PM calls.

Output to standard streams is directed by PM to the file handles for standard streams. The PM interface does not display output and messages to these streams. To see them, you must redirect the streams.

There are two ways to display the output sent to stdout, cout, or wcout:

All error messages during run time go to stderr, cerr, clog, wcerr or wclog. To see the error messages in a PM window, you must redirect the error stream.

Programs that use the User Interface classes can force the output messages of C++ exceptions in the library to either stderr, stdout, or to a queue. To do this, before running a Presentation Manager application, set the following two environment variables:

  1. ICLUI TRACE
    You can set ICLUI TRACE to off, on, or noprefix. This last value means the trace is set on, but no prefix information is written to trace. The default setting is off.
  2. ICLUI TRACETO
    You can set ICLUI TRACETO to a standard error stream or to a queue. The default, queue, directs trace information to an OS/2 queue named \\QUEUES\PRINTF32.



Stream Processing
Standard Streams
Application Runtime Environment Variables


Redirect Standard Streams


Considerations for Programming Stream I/O