MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » June 2013

Re: redirect logging in QSHELL



fixed

Does QIBM_QSH_CMD_OUTPUT redirect stderr and stdout?

John McKee

On Mon, Jun 17, 2013 at 10:43 AM, Dan Kimmel <dkimmel@xxxxxxxxxxxxxxx> wrote:
Tracing goes to standard error and I think QIBM_QSH_CMD_OUTPUT may direct only standard output.

I'm confused by the #/bin/qsh -x command. Doesn't the # in front make it a comment? Unless it's supposed to be #! which insures the proper shell script is loaded. Can you use hash-bang to add trace to the shell? Maybe he's loading a sub-shell to do tracing. I tried this and my stderr went to stderr.txt:

qsh -x 2>stderr.txt
ls
... ls output
exit
$
cat stderr.txt
$ + ls
$ + exit
$


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Monday, June 17, 2013 10:16 AM
To: Midrange Systems Technical Discussion
Subject: Re: redirect logging in QSHELL

Hi Marco,

QIBM_QSH_CMD_OUTPUT has always worked properly for me. Can you please double-check that this variable is set in the job that's running the QSH command? (i.e. if you're submitting the QSH command to batch, make sure the variable is set in the batch job -- as opposed to the submitter)

If that doesn't help, can you show me how to reproduce the problem?
Maybe it's something simple.


On 6/17/2013 3:48 AM, marco.frn@xxxxxxxxxx wrote:
I have to run scripts in qshell that use 'read' command to get user
input, in these scripts I use "#/bin/qsh -x" for tracing.
Can I
redirect the output of trace to a file ?
I tried to set the envvar
QIBM_QSH_CMD_OUTPUT but it only works when I run the command QSH from
OS400 prompt (like: QSH CMD (ls)) .

Thanks
Marco
--
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.



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






Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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 here. If you have questions about this, please contact