|
Thanks Richard
On Fri, Sep 11, 2020 at 8:53 AM Richard Schoen <richard@xxxxxxxxxxxxxxxxx>
wrote:
For future reference in case you want something a little moreand
self-contained for those QSH/PASE calls:
https://github.com/richardschoen/QshOni
QshOni
This IBM i library contains useful CL wrapper commands to allow Qshell
Pase apps to be called and consumed from regular IBM i jobs via CL, RPGor
COBOL programs. It also has a CL command to scan stdout for a specificcommand
value if you need to do something simple to check for a successful
run.Spool
The main benefit of this wrapper is to be able to integrate Qshell/Pase
applications on-the-fly with standard IBM i job streams.
QSHONI/QSHEXEC CMDLINE('curl --request POST --url +
https://xxxxx.com/token +
--header "accept: application/json" +
--header "authorization: Basic +
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+
--data "{\"xxxxx_xxxx\": +
\"client_credentials\"}" -k > +
/tmp/token.txt') SETPKGPATH(*YES)
The SETPKGPATH parm will set the path to the Yum packages from IBM as
wellas the multithreading.
You can also monitor for an error on the command if the QSH/PASE command
fails and can write STDOUT results to an IFS file, OUTFILE, JOBLOG or
File.list
Great for incorporating those QSH/PASE commands into standard batch jobs.
Regards,
Richard Schoen
Web: http://www.richardschoen.net
Email: richard@xxxxxxxxxxxxxxxxx
-----Original Message-----
Subject: Re: cURL Open source installation
From: "Art Tostaine, Jr." <atostaine@xxxxxxxxx>
Date: Thu, 10 Sep 2020 19:23:17 -0400
For the archives, in my CLLE program I did cd '/qopensys/pkgs/bin', then
added an envvar to fix an error per this page:
curl: (6) getaddrinfo() thread failed to start
https://bitbucket.org/ibmi/opensource/issues/92/curllib-7653
QIBM_MULTI_THREADED=Y
I'm able to get this to run in batch and leave the returned token to the
IFS. It's a cake walk from here :-)
CLP
PGM
CD DIR('/qOpenSys/pkgs/bin/')
ADDENVVAR ENVVAR(QIBM_MULTI_THREADED) VALUE(Y)
monmsg CPFA980
STRQSH CMD('curl --request POST --url +
https://xxxxx.com/token +
--header "accept: application/json" +
--header "authorization: Basic +
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+
--data "{\"xxxxx_xxxx\": +
\"client_credentials\"}" -k > +
/tmp/token.txt')
endpgm
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
Art Tostaine
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
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.