I'm not familar with escaping. Where could I find an example?
Sent: Friday, February 26, 2021 at 4:12 PM
From: "Kevin Adler" <kadler@xxxxxxxxxx>
Subject: Re: [IBMiOSS] Scripting cURL to execute in CL Programs
I believe the problem is caused by the User Id & Password being
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.
To quote quotes in CL, you double them up, eg. QSH CMD('echo ''this is a
single quoted string''')
In standard Unix shells, you can use single or double quotes so since CL
doesn't care about double quotes you could use that instead, eg.
QSH CMD('echo "this is a double quoted string"')
Just remember that in Unix shells, double quoted strings support escaping
_and_ variable interpolation while single quoted strings allow neither. If
any part of your command contains a dollar sign, backslash, or double
quotes, those will need to be escaped inside the double quotes.
This is the IBMi Open Source Roundtable (OpenSource) mailing list
To post a message email: OpenSource@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: OpenSource-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
Help support midrange.com by shopping at amazon.com with our affiliate
As an Amazon Associate we earn from qualifying purchases.