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



Scott,

Thanks for your response--and sorry it's taken me so long to respond. (I
got tied up with higher priorities.)

Do you (like us) continue to use the QUSRJOBI API?

To run the shell script in PASE, we build a string and call QP2SHELL:

CALL PGM(QP2SHELL) PARM('/QOpenSys/usr/bin/sh' '-c' +
&COMMAND)

I probably need to re-read your articles on UNIXCMD, but if I understand
it correctly the RCVPIPE essentially lets me "read" the STDOUT from
PASE/QShell. I don't think that exactly fits with our needs. Here's our
scenario:

The &COMMAND variable specifies the script with parameters to specify the
variable data, configuration files, etc. We use it to transfer positive
pay information to our bank after each run of checks. the file is
digitally signed using gpg (GnuPG) and the actual transfer uses scp
(Secure CoPy). The STDOUT and STDERR output is overridden and generates
spoolfiles--STDOUT generally to an active outq and STDERR to an inactive
one that can be reviewed when the user return code is not zero. The output
from STDOUT is required for reconciliation/audit purposes--hence the
desire not to change what's output to STDOUT.

I'm going to go read the series of articles on UNIXCMD now.

Michael Quigley
Computer Services
The Way International
www.TheWay.org

"MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx> wrote on 07/01/2017
01:00:03 PM:
----- Message from Scott Klement <midrange-l@xxxxxxxxxxxxxxxx> on
Fri, 30 Jun 2017 18:25:44 -0500 -----

To:

Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>

Subject:

Re: Checking return status from PASE

Michael,

I have the same experience. The User RC has always worked well for me,
but IBMers (and the docs) have told me that it is not reliable.

You did not say how you're going about running PASE?

But, I would suggest either running it through the STRQSH command, or by

using a tool like my (free) UNIXCMD tool. These use pipes to solve the
thread safety concerns.

-SK


On 6/30/2017 10:19 AM, MichaelQuigley@xxxxxxxxxx wrote:
I developed the habit years ago of calling QUSRJOBI and checking the
"User
return code" to see if things finished correctly. However, the
documentation on QUSRJOBI states:

N/A; do not use: Thread safety is not applicable (N/A). The user
return
code field is the most recent return code set by any thread within the
job. Many operating system functions run C code and change the value
of
the user return code. Changes to this field occur at times that cannot
be
predicted or controlled by user programming, even when the job is
single-threaded. To receive a value returned by a called program, it
is
better to provide a parameter to receive that value than to rely on
this
job-scoped user return code field.

Returning a parameter from PASE isn't really available. I've never had
a
problem with the "User return code", but the documentation above is
pretty
emphatic that I'm doing the wrong thing. Does anybody know of another
method to return the completion status of a script in PASE?

Thanks,
Michael Quigley
Computer Services
The Way International
www.TheWay.org


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.