Hello,
i call a php program from my cl with
CALL PGM(QP2SHELL) ...
the php is called, but then opens the QSHELL.
can i close the QSHELL from my php programm?
Or can i call a php programm without starting qshell?
btw. can i sent parms back to the cl from php?
Thanks for your help i am just starting php on i5.
by jo
Software/Hardware used:
ASKED:
February 26, 2008 4:15 PM
UPDATED:
April 7, 2010 2:52 AM
Can you please tell me what the possible command parameters are when calling QP2SHELL?
I understand the -c for a command string but are there any other values when using the AS/400.
I am trying to create a session logfile and I have used the command string
“sftp username@servername.com.au >/temp/logfile.txt” when calling QP2SHELL but does not seem to be visable……thanks
Since QP2SHELL involves a PASE shell, it has essentially nothing to do with QSHELL.
I assume that what you are actually saying is that a ‘terminal session’ is opened rather than “the QSHELL”.
QSHELL can use terminal sessions just like PASE can. If a terminal session is what you are referring to, then it is quite likely happening because you aren’t controlling file descriptors 0, 1 and 2. You are either letting them default so that they are expecting input from or output to the terminal.
Of course, CL has no concept of file descriptors. (In V5R4 and later, it’s potentially easier because the *PTR data type is available.) The overall problem is most likely that you are using an inappropriate language — CL. Write your program in C instead. Set up the appropriate PASE environment and call the appropriate PASE APIs.
Tom