×
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.
Hmmm... First of all, you're using QP2SHELL to invoke a shell script,
but, as far as I can tell, you haven't invoked the shell at all. Your
call should look more like this:
CALL QP2SHELL PARM('/QOpenSys/usr/bin/sh' +
'-c' +
'/home/user1/blah.sh')
The first parameter is the shell (in this case, 'sh', which is the
Bourne shell). The second parameter, -c, tells it to run a command.
The third parameter, is the command to run -- in this case, your shell
script.
The OVRDBF might be failing due to an activation group issue. If you're
issuing OVRDBF from the default activation group, it should work just
fine because it'll use OVRSCOPE(*CALLLVL) by default. If you're running
an ILE CL program from a different activation group, however, your
OVRDBF won't work because QP2SHELL runs in ACTGRP(*NEW) and therefore
will be in a different activation group than your override. (Unless you
explicitly code the OVRSCOPE)
There's another API called QP2SHELL2 which is identical to QP2SHELL,
except that QP2SHELL2 runs in ACTGRP(*CALLER).
Having said all of that... I don't understand why your STDOUT would go
to QPRINT?! The default (if you don't do an override) is to display it
on the screen... so it's weird to me that it'd go to QPRINT unless
you've told it to. What is QIBM_USE_DESCRIPTOR_STDIO set to?
Michael Ryan wrote:
I'm doing these overrides:
OVRDBF FILE(STDOUT) TOFILE(MYLIB/STDOUT)
OVRDBF FILE(STDERR) TOFILE(MYLIB/STDERR)
and invoking PASE with a shell script:
CALL PGM(QP2SHELL) PARM('/home/user1/blah.sh')
and I would expect the output of the script going to the files.
However, STDOUT (and probably STDERR - which is why I'm trying the
override) is going to QPRINT.
What am I doing wrong? Thanks...
As an Amazon Associate we earn from qualifying purchases.