Thans Richard. Since I posed my questions to the Group, I had found QSHONI
and downloaded it.
I plan to install it on the Clients System tomorrow morning and give it a
try. It looks like it will make
the process easier. We will be exchanging 10+ MB Files several times
month.
Sent: Sunday, February 28, 2021 at 1:25 PM
From: "Richard Schoen" <richard@xxxxxxxxxxxxxxxxx>
To: "opensource@xxxxxxxxxxxxxxxxxx" <opensource@xxxxxxxxxxxxxxxxxx>
Subject: Re: [IBMiOSS] Scripting cURL to execute in CL Programs
Install QSHONI and make calling shell stuff so much easier. It handles all
the little details for you.
You can call your curl command listed below and consume the results as an
OUTFILE, Spool File or in the joglog (Not recommended for large results).
QSHONI/QSHEXEC CMDLINE('/QOpenSys/usr/bin/sh -c
"/QOpenSys/bin/script.sh"')
QShell on i Commands
[1]
http://www.github.com/richardschoen/qshoni
Regards,
Richard Schoen
Web: [2]
http://www.richardschoen.net
Email: richard@xxxxxxxxxxxxxxxxx
----------------------------------------------------------------------
message: 1
date: Sat, 27 Feb 2021 12:06:44 -0600
from: "Jacob Banda" <jnbanda@xxxxxxxxxx>
subject: Re: [IBMiOSS] Scripting cURL to execute in CL Programs
I agree with Bryan's suggestion. At least it's easier for me that way.
QSH CMD('/QOpenSys/usr/bin/sh -c "/QOpenSys/bin/script.sh"') where
/QOpenSys/bin/script.sh is any PASE shell command or script.
See IBM's article on calling shell scripts from CL.
[3]
https://www.ibm.com/support/pages/node/684869
-----------------------------------------
Jacob Banda
-----------------------------------------
-----Original Message-----
date: Fri, 26 Feb 2021 15:02:27 -0600
from: Bdietz400 <bdietz400@xxxxxxxxx>
subject: Re: [IBMiOSS] Scripting cURL to execute in CL Programs
It might help to put the curl steps in a shell script file and run that
from the command line program
--
Bryan Dietz
> On Feb 26, 2021, at 9:01 AM, Michael Fulmer <mfulmer@xxxxxxx> wrote:
>
> ? Has anyone had success scripting cURL to execute in an IBM i CL
Program?
>
> I have a project to access a Vendor Web Site using cURL to upload a
file,
> wait till the file is processed and download a resulting file.
>
> I have been provided the cURL Commands for the process.
>
> I've enetered cURL command through a QP2TERM Terminal Session and had
> success uploading the data file.
>
> Now I need to script the cURL Command to run from an IBM i CL Program.
>
> The upload command is as follows:
>
> curl -v [4]
https://vendorurl.net/import -u'Noreply@xxxxxxxxxxx:Password'
-F
> data=@/temp/uploaddata_20210226.csv >
> /response/response_20210226.json
>
> I believe the problem is caused by the User Id & Password being enclosed
> in single quotes.
> I've written many dynamic SQL Statements in RPGLE and substituted
> parameters in CL Program,
> but none of my methods for quoting a string have worked.
>
> Any advice would be appreciated.
>
> Thanks,
>
> Michael Fulmer
>
------------------------------
Subject: Digest Footer
--
This is the IBMi Open Source Roundtable (OpenSource) mailing list To post
a message email: OpenSource@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit: [5]
https://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
[6]
https://archive.midrange.com/opensource.
Help support midrange.com by shopping at amazon.com with our affiliate
link: [7]
https://amazon.midrange.com
------------------------------
End of OpenSource Digest, Vol 6, Issue 12
*****************************************
--
This is the IBMi Open Source Roundtable (OpenSource) mailing list
To post a message email: OpenSource@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: [8]
https://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at [9]
https://archive.midrange.com/opensource.
Help support midrange.com by shopping at amazon.com with our affiliate
link: [10]
https://amazon.midrange.com
References
Visible links
1.
http://www.github.com/richardschoen/qshoni
2.
http://www.richardschoen.net/
3.
https://www.ibm.com/support/pages/node/684869
4.
https://vendorurl.net/import
5.
https://lists.midrange.com/mailman/listinfo/opensource
6.
https://archive.midrange.com/opensource
7.
https://amazon.midrange.com/
8.
https://lists.midrange.com/mailman/listinfo/opensource
9.
https://archive.midrange.com/opensource
10.
https://amazon.midrange.com/
As an Amazon Associate we earn from qualifying purchases.