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

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.