What's the + for in the command? If you remove that, does it work? Chris
Unconfigured Ad Widget
Collapse
Announcement
Collapse
No announcement yet.
QSH Redirect no longer works in CL at V5R4M0
Collapse
X
-
QSH Redirect no longer works in CL at V5R4M0
David Thanks for the idea/lead - we thought that would do the trick but no such luck. Added the attached code, compiled the progam at V5R4M0 and still get the terminal session screen with an empty file. Appreciate the input and direction it's been the best option we've had in the past month. Bill
Code
Comment
-
QSH Redirect no longer works in CL at V5R4M0
Try here: http://publib.boulder.ibm.com/infoce...zahz/cmdcl.htm It says to use the QIBM_QSH_CMD_OUTPUT environment variable (_CMD_ instead of _COMMAND_).
Comment
-
QSH Redirect no longer works in CL at V5R4M0
I see in the Qshell manual: If a Qshell session is already active in an interactive job, you are reconnected to the existing session. It would be good to make sure that isn't the case. Have you checked your two command approaches ( > and QIBM_QSH_CMD_OUTPUT) with something simple, such as ls, instead of java? It would be good to determine whether redirect just doesn't fundamentally work or is narrowed down to java standard (and error) output interaction with Qshell redirection. This gave me an opportunity to take a look at Ted Holt's Qshell for iSeries book I just got. As usual from Ted, clear explanations and good examples. Oh, and co-author is Fred Kulack from IBM. At least I can understand the question now. rd P.S. And when I posted, I see Ken saw a typo in the environment variable. The QIBM_QSH_CMD_OUTPUT is in Ted's example too.
Comment
-
QSH Redirect no longer works in CL at V5R4M0
To one and all - We use an in-house utility to verify java levels on our client machines prior to the client upgrading their version of our software. The utility was first created in late 2000 and compiled at V4R5M0 and has worked just fine at all V5RxMx OS400 levels since then until the failure we experience now at V5R4M0. The CL creates a PF which is followed by the QSH command which redirects the results to the PF just created. DLTPF FILE(CCOMMON/SVER) MONMSG MSGID(CPF2105) CRTPF FILE(CCOMMON/SVER) RCDLEN(128) STRQSH CMD('java -version > + /qsys.lib/ccommon.lib/sver.file/sver.mbr') When the QSH command runs at V5R4M0 it starts a terminal session rather than redirecting the command results to the file. The session does display the results but leaves an empty file. After the user exits from the terminal session the CL fails because the file is empty. I could monitor for the CPF EOF message but it would not give the CL the java level and then allow the control of the CL as required when verifying the client environment. Running in batch only generates a MSGW status on the job and an empty file. Thanks for any insight and suggestions. Bill Willett
Comment
-
QSH Redirect no longer works in CL at V5R4M0
To all: Sorry, I have not had time to get back to the forum until today - bosses can be so demanding (lol). Thank you for all the ideas and input. The change for the output environment variable from COMMAND to CMD did work. I really appreciate the time & effort you all have given this question. Once again, thank you. Bill
Comment
Comment