|
Scott, Thanks for the clear detailed response. About your question: I feel better in the Linux like scripts than in the CL which is new to me. In addition, I need to execute a PC command with argument from my QSH script. Anyhow, I shall ask my local CL gurus to help me with this step. Best regards, Zvi --- Scott Klement <midrange-l@xxxxxxxxxxxxxxxx> wrote:
Hi Zvi, QShell runs it's programs in a separate job. Your current interactive job spawns a background job. All of the work is done in that background job, and the input/output from the background job is (by default) connected to your interactive job using pipes. This is done so that both jobs (or even more jobs if you like) can run simultaneously. Unfortunately, the System i is not Unix, no matter how much it might want to pretend to be. A background job isn't connected directly to a 5250 terminal and therefore can't act like it's connected directly to a 5250 terminal. And that's exactly what STRPCCMD is -- it's a tool that works with a 5250 terminal. When you issue STRPCCMD, i5/OS creates a specially formatted "screen" containing the command. It sends it to your 5250 terminal emulator, which sees the special format of the "screen", and instead of displaying it in front of you, it takes the command and runs it on the local machine. QShell can't do that because the program isn't connected to the terminal! It can't format a special 5250 screen. Granted, it could send it to a pipe to be written out in the interactive job, but then what happens when the pipe is redirected to a file or another program? Plus, inserting a 5250-specific command into a Unix-like environment doesn't really make sense. QShell does have the rexec command -- which is a Unix tool for running a remote command on another machine. It's significantly more powerful than STRPCCMD, but the issue with that is that you either have to configure windows to accept commands without a userid/password (which opens up the machine to commands from anyone without any credentials -- though, I suppose you could restrict it with the firewall config) or you need to code a userid/password into a QShell script. You also have to set up the remote command server on every PC, which can be extra hassle. The main thing that puzzles me is this: If you know that you want STRPCCMD. And you know you're using an i5/OS environment -- why would you want to use QShell or PASE? Why not simply use STRPCCMD from a CL program in the interactive job? -- Scott Klement http://www.scottklement.com On Sun, 26 Nov 2006, Zvi Kave wrote:I am trying to activate PC command from QSH. Something like: STRPCO STRPCCMD PCCMD('"C:\Program Files\progname.exe"') Is there such a command from QSH or PASE ? Regards, Zvi
____________________________________________________________________________________
Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mailbeta.http://new.mail.yahoo.com -- This is the Midrange Systems Technical Discussion(MIDRANGE-L) mailing listTo 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 thearchivesat 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.
____________________________________________________________________________________ Want to start your own business? Learn how on Yahoo! Small Business. http://smallbusiness.yahoo.com/r-index
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.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 on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.