× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




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?


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.