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



I have just created a more general gist that will do the trick for you:

https://gist.github.com/NielsLiisberg/c60ae8267edd09df94ef4c2fba718268



On Thu, Jun 11, 2020 at 10:51 AM Niels Liisberg <nli@xxxxxxxxxxxxxxxxx>
wrote:

Got you !!

You need to use the PASE -. which can be done quite simple:

Take a look at this example:
1) Here i use the "sh" shell but you can use bash if you have installed it
with YUM .
2) the '-c' flag is a trick I use ( also works on bash) - to tell the
shell that "Next parameter is a script"
3) So the &script is you script you run in PASE

pgm



dcl var(&shell) type(*char) len(32)

dcl var(&c) type(*char) len(3)

dcl var(&script) type(*char) len(4096)

dcl var(&null) type(*char) len(1) value(x'00')



chgvar &shell ('/QOpenSys/usr/bin/sh' !< &null)

chgvar &c ('-c' !< &null)

chgvar &script ('cd /; PATH=/QOpenSys/pkgs/bin:$PATH; export PATH; cd
/wikijs; node server.js' !< &null)


call pgm(qp2shell) parm(&shell &c &script)



endpgm


On Thu, Jun 11, 2020 at 10:08 AM gio.cot via MIDRANGE-L <
midrange-l@xxxxxxxxxxxxxxxxxx> wrote:

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



As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.