James

I would not make any assumptions about equivalence between shell commands and CL commands. Some things that QShell uses ARE symbolic links to *PGM objects, but not all. Here is the link information for the cp command -

Object link . . . . . : /usr/bin/cp
Content of Link . . . : /QSYS.LIB/QSHELL.LIB/CP.PGM

Here is a listing of /usr/bin that has links both to shell scripts and to iSeries programs -

db2 SYMLNK->PGM
db2profc SYMLNK->STMF
db2profc_trace SYMLNK->STMF
db2profp SYMLNK->STMF
db2tx SYMLNK->PGM
del SYMLNK->PGM
dfmadmin SYMLNK->STMF
dirname SYMLNK->PGM
dspmsg SYMLNK->PGM

Not many are links to shell scripts, however.

The CPY command ends up using program QP0LCCPY in QSYS. Now we have no idea whether they act the same.

Crazy idea - one might be able to replace program CP with your own, if you could reverse-engineer things - heh! It is *USER state and domain, as it appears. QP0LCCPY is *SYSTEM state and domain.

That is on a V5R1 box - is this an opening for mischievous exploits?

Later
Vern

James Rich wrote:
On Sun, 16 Aug 2009, Tom Liotta wrote:

I wouldn't expect it to make a difference, but why run it through QSH?
Won't a CPY command work for you? I've always worked with NFS in
QSYS.LIB rather than QSH or PASE, so I don't know what differences might
complicate things.

I suppose I could do that. I suspect that CPY and qshell's cp command use the same code under the covers. I guess I'm just a shell kind of guy.

But I also prefer removing as many layers as I can when tracking things
down. Analysis _might_ be simpler. Maybe.

Could be worth a test.

James Rich

if you want to understand why that is, there are many good books on
the design of operating systems. please pass them along to redmond
when you're done reading them :)
- Paul Davis on ardour-dev

This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2019 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].