there is no OUTQ file on OS/400, there is only a print file which is attached to an OUTQ. By default OS/400 identifies the C streams STDOUT and STDERR with file QPRINT. Unless you have changed it, this will point at output queue QPRINT as well. To use a different file or output queue you will have to issue and OVRPRTF for the file STDOUT and/or STDERR. You then have the option of using the system defined QPRINT file or some other one and placing it on a different queue.
Specify OVRPRTF (STDOUT) OUTQ(lirary/queue) where ‘queue’ is the name of the OUTQ you want to send output to and ‘library’ is the library containing it.
You might need to put this in a CL program before your C program runs or you may get away with using the ‘system’ function to execute the command as the first thing your C program does – I haven’t tried it myself so don’t know.
Hope this helps