Hi
Solved in this way
CALL PGM(QP2SHELL) PARM('/QOpenSys/bin/sh' '/home/myflr/myscript.sh')
Myscript.sh , must:
- begin with "#!/usr/bin/sh"
- CCSID 00819
- Stream file EOL option . . . . *LF
This is my script
#!/usr/bin/sh
PATH=/QOpenSys/pkgs/bin:$PATH
export PATH
cd /myflr
node myserver
thanks all
Gio
-----Messaggio originale-----
Da: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxxxxxxxx] Per conto di
gio.cot via MIDRANGE-L
Inviato: giovedì 11 giugno 2020 10:12
A: 'Midrange Systems Technical Discussion' <midrange-l@xxxxxxxxxxxxxxxxxx>
Cc: gio.cot <gio.cot@xxxxxxxxxxx>
Oggetto: R: How to run from CLP a .sh script
Hi Niels
If i run in this way
QSH CMD('cd /; PATH=/QOpenSys/pkgs/bin:$PATH; export PATH; cd /wikijs; node
server')
I receive this error :
[1844]: ../src/node_platform.cc:63:std::unique_ptr<unsigned int>
node::Worker
ThreadsTaskRunner::DelayedTaskScheduler::Start(): Assertion `(0) ==
(uv_threa d_create(t.get(), start_thread, this))' failed.
qsh: 001-0078 Processing ended with signal 5
-----Messaggio originale-----
Da: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxxxxxxxx] Per conto di
Niels Liisberg
Inviato: mercoledì 10 giugno 2020 10:27
A: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Oggetto: Re: How to run from CLP a .sh script
Maybe a simple qsh will do the trick for you in this case:
QSH CMD('cd /;PATH=/QOpenSys/pkgs/bin:$PATH;export PATH;cd /myflr;node
mynodejs')
On Tue, Jun 9, 2020 at 8:15 PM Richard Schoen <richard@xxxxxxxxxxxxxxxxx>
wrote:
This could make your life easier.
QshOni is a wrapper around QSH that can capture log info to OUTFILE,
IFS, Spool File or the Joblog.
https://github.com/richardschoen/QshOni
Regards,
Richard Schoen
Web: http://www.richardschoen.net
Email: richard@xxxxxxxxxxxxxxxxx
------------------------------
message: 3
date: Tue, 9 Jun 2020 15:47:18 +0200
from: "gio.cot via MIDRANGE-L" <midrange-l@xxxxxxxxxxxxxxxxxx>
subject: How to run from CLP a .sh script
Hi all
I would need to run in batch (with a scheduled job) this script .sh
cd /
PATH=/QOpenSys/pkgs/bin:$PATH
export PATH
cd /myflr
node mynodejs
if from command line i run call qp2term and then i enter command for
command (listes in the above .sh script) every thingh is ok..
now i would schedule these command and run via CLP ..
how can i do it ?
Thanks in advance
Gio
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
related questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit:
https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate link:
https://amazon.midrange.com
--
Questa e-mail è stata controllata per individuare virus con Avast antivirus.
https://www.avast.com/antivirus
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit:
https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate link:
https://amazon.midrange.com
--
Questa e-mail è stata controllata per individuare virus con Avast antivirus.
https://www.avast.com/antivirus
As an Amazon Associate we earn from qualifying purchases.