|
----- Original Message -----
From: "Scott Klement" <midrange-l@xxxxxxxxxxxxxxxx>
To: "Midrange Systems Technical Discussion" <midrange-l@xxxxxxxxxxxx>
Subject: Re: Changing the owner of multiple objects in the IFS
Date: Wed, 10 Oct 2007 19:15:01 -0500
Sure, you can redirect pretty much anything in Qshell to a file. Just
use the redirection operators. (The following should all be on one line,
in case the e-mail software wraps it)
Assuming that you just want to save error messages (which go to stderr,
which id descriptor #2) you'd code this:
find (parameters here) 2> /tmp/errors.txt
In that syntax, anything written to descriptor 2 (which is where erorr
messages go) is redirected to the /tmp/errors.txt file in the IFS.
Normal (non-error) messages are written to stdout, which is descriptor
#1, which you can redirect the same way, or you can omit the descriptor
number, since it's the default:
find (parameters here) > /tmp/errors.txt
If you're calling 'find' from a CL program, it might be easier to use
OVRDBF or OVRPRTF instead. For example:
OVRDBF FILE(STDERR) TOFILE(QTEMP/ERRORS)
STRQSH CMD('find (parameters here)')
DLTOVR FILE(STDERR)
You can override STDOUT as well (just specify STDOUT instead of STDERR)
and you can use OVRPRTF if you want to write the results to the spool
instead of writing it to a database file.
So... lots of options :)
Albert York wrote:
Thanks Scott,--
Is there a way to pipe the output of this to a file?
Albert
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.