× 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.



El Wed, 30 Nov 2016 17:02:45 -0600
Scott Klement <midrange-l@xxxxxxxxxxxxxxxx> escribió:
Manuel,

That'd be true if we were interested in PASE, but the OP (as shown in
the subject line) is interested in QShell. Since 'which' is a PASE
utiiity, it will not find all QShell tools.

But, the IBM-supplied ones are in /usr/bin, so you can do:

STRQSH

$ ls -l /usr/bin/rm

It will tell you that rm is a symlink to /QSYS.LIB/QSHELL.LIB/RM.PGM.
You can then do:

WRKPGM QSHELL/RM

to see what sort of *PGM object it is. If it had been a PASE program,
then your technique would work nicely.

-SK


On 11/30/2016 3:33 PM, Manuel Chaviano wrote:

"file" will give you some details about the file type.

call QP2TERM

You need to provide the fill path: use "which" to determine where is "rm"
located:

> which rm
/QOpenSys/usr/bin/rm

Now you can use "file":

> file /QOpenSys/usr/bin/rm
/QOpenSys/usr/bin/rm: executable (RISC System/6000) or object module

...an AIX RS/6000 object or module


I just tried using STRQSH:

$
which rm
/QOpenSys/usr/bin/rm
$
file /QOpenSys/usr/bin/rm
/QOpenSys/usr/bin/rm: symbolic link to ../../QIBM/ProdData/OS400/PASE/bin/r
m
$

I navigate to the symbolic link:

pwd
/QOpenSys/QIBM/ProdData/OS400/PASE/bin
$

and the "file" command gives me a similar result to QP2TERM:
file rm
rm: executable (RISC System/6000)
$

"echo $PATH" [within STRQSH]:
/usr/bin:.:/QOpenSys/usr/bin
"echo $PASE_PATH" [within STRQSH]:
/QOpenSys/usr/bin:/usr/ccs/bin:/usr/sbin:/usr/bin:/QOpenSys/usr/local/bin:.

Looks like from STRQSH:
1) "which" is a PASE command.
2) PASE commands will not use $PATH from STRQSH, but its own $PASE_PATH
3) Typing "rm" will execute the ILE version (how can I be sure?)

There is no "which" program in QSHELL.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.