|
Kevin,--
I normally use QP2SHELL so that the process runs in the same job to prevent starting copious jobs when the process is repeated frequently.
QSH starts a new job for each process.
Peter
-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of
Kevin Adler
Sent: Tuesday, 22 November 2016 6:23 AM
To: Midrange Systems Technical Discussion
Subject: Re: PASE for i ended for signal 6, error code 1.
I'd recommend using QSH for batch processing of Node.js applications.
QP2SHELL does not set up a proper environment, especially around file descriptors that can cause issues with Node.js applications.
For interactive applications, SSH (or in a pinch QP2TERM) is still the recommended environment.
"MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx> wrote on 11/19/2016
06:00:51 PM:
From: Peter Connell <Peter.Connell@xxxxxxxxxx>command.
To: "MIDRANGE-L@xxxxxxxxxxxx" <MIDRANGE-L@xxxxxxxxxxxx>
Date: 11/19/2016 06:01 PM
Subject: PASE for i ended for signal 6, error code 1.
Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx>
I have a node.js script that runs fine when executed via the QSH
But when executed via QP2SHELL or QP2SHELL2 it dies with the CPFB9C6list
- PASE for i ended for signal 6, error code 1.
Here is the node.js script. It simply performs an HTTPS GET via a
forward proxy and writes the response to a flat file.
// ADDENVVAR ENVVAR(QIBM_MULTI_THREADED) VALUE(Y) is required before
running this script to avoid signal 5.
// To run enter the following command QSH CMD('node /home/pjctest/
node/proxyTest2.js')
var request = require('/QOpenSys/QIBM/ProdData/Node/lib/
node_modules/npm/node_modules/request');
var fs = require('fs');
var outfile = '/tmp/proxyTest.txt';
var url = 'https://ewp.co.nz/admin/login';
var proxy = 'http://10.9.31.37:3128';
const args = process.argv;
console.log(args);
request( {'url': url, 'proxy': proxy }, function(error, response,
body) { fs.writeFile(outfile, body); } ).end();
From QSH the outfile is created OK
Here is the RPGLE to invoke QP2SHELL2
*inLR = *on;
pgmnam = '/QOpenSys/QIBM/ProdData/Node/bin/node';
cmd1 = '/home/pjctest/node/proxyTest2.js' + x'00';
C Call 'QP2SHELL2'
C Parm pgmnam 37
C Parm cmd1 33
return;
From RPGLE the outfile is not created and it dies with CPFB9C6.
I'm wondering if the script needs some closing code to end it.
Regards, Peter
##############################################################
This correspondence is for the named person's use only. It may
contain confidential or legally privileged information, or both. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this correspondence in error, please immediately
delete it from your system and notify the sender. You must not
disclose, copy or rely on any part of this correspondence if you are
not the intended recipient. Any views expressed in this message are
those of the individual sender, except where the sender expressly,
and with authority, states them to be the views of Veda. If you need
assistance, please contact Veda :- Australia
http://www.veda.com.au/contact-us New Zealand
http://www.veda.co.nz/contact-veda
##############################################################
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L)
mailing
To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,questions.
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take
a moment to review the archives at
http://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related questions.
##############################################################
This correspondence is for the named person's use only. It may contain
confidential or legally privileged information, or both. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this correspondence in error, please immediately delete
it from your system and notify the sender. You must not disclose, copy
or rely on any part of this correspondence if you are not the intended
recipient. Any views expressed in this message are those of the
individual sender, except where the sender expressly, and with
authority, states them to be the views of Veda. If you need
assistance, please contact Veda :- Australia
http://www.veda.com.au/contact-us New Zealand
http://www.veda.co.nz/contact-veda
##############################################################
As an Amazon Associate we earn from qualifying purchases.
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.