QSHELL output redirect

0 pts.
Tags:
AS/400
Using ENVVAR QIBM_QSH_CMD_OUTPUT = 'FILE=/home/someflr/somefile.txt' From cmd line to test using STRQSH CMD('java -version') V5R3 works fine, following text is written to file java version "1.3.1" V4R5 does not work. PTF SF63868 for APAR SA89972 is applied permanent. Nothing is written to file. What gives ?
ASKED: December 6, 2006  4:17 PM
UPDATED: December 11, 2006  5:42 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Support for QIBM_QSH_CMD_OUTPUT was only added in V5R2 so although you can declare any environment variables you like, QSHELL wasn’t looking for this value before V5R2.
You can use Unix-like redirection e.g.
QSH CMD(‘java -version > /home/dir/outfile’) which will send STDOUT to /home/dir/outfile. I’m not sure what it will do with STDERR, though.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • BillBlalock
    You can use System.properties to control stdout, stderr and stdin for Java. For example: os400.stdio.convert = Allows control of the data conversion for stdin, stdout, and stderr in Java. Data conversion occurs by default in the Java virtual machine to convert ASCII data to or from EBCDIC. You can turn these conversions on or off with this property, which affects the current Java program. See Values for os400.stdio.convert and os400.child.stdio.convert system properties. For Java programs started using the Runtime.exec() method, see os400.child.stdio.convert. os400.stdout = Allows mapping stdout to a file or socket. See default values.
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following