Post by Knut Berg
when running strqsh it's possible to use the db2 command which is
quite practical for piping the output to emails etc.
db2: cannot execute
Can it have something to do with multi-threaded environment?
It might, but what exactly are you trying?
I've never heard of the "db2 command", but it is presumably an MI (perhaps
ILE) program that is likely to be found by QShell via a symbolic link in
/usr/bin. i5/OS PASE shells don't directly understand/run MI programs, but
you can call an MI program using the i5/OS PASE "system" or "qsh" utility.
Assuming "db2" is an MI program object in library "xxx", you could enter
this on the ksh (Korn shell) command line that is the default for QP2TERM to
run the CL "call" command for the specified program:
system 'call xxx/db2'
If "db2" is symbolic link /usr/bin/db2, this command may also work from the
QP2TERM command line:
qsh -c /usr/bin/db2
If that works, you can make the invocation "automagic" by adding this
ln -s /QOpenSys/usr/bin/qsh /QOpenSys/usr/bin/db2
With this symbolic link, you will be able to simply type "db2" from the
command line presented by QP2TERM (because the i5/OS PASE "qsh" utility
recognizes when it is invoked by another name and searches for a link of the
same name in /QOpenSys/usr/bin and tries to run it as an MI program)