call php from cl

30 pts.
Tags:
AS/400
CL
PHP
Qshell
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

Answer Wiki

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

Hi,

In a QSHELL script the following should stop the QSHELL appearing :-

$(QIBM_QSH_CMD_OUTPUT=”NONE”)

I don’t know if this will work from PHP, but maybe it’ll give you a starting point.

Regards,

Martin Gilbert.

Discuss This Question: 2  Replies

 
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
  • Mitchb
    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
    145 pointsBadges:
    report
  • TomLiotta
    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
    125,585 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