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>
To: opensource@xxxxxxxxxxxxxxxxxx
Subject: Re: [IBMiOSS] Scripting cURL to execute in CL Programs
   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.
 
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,
visit: [1]https://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at [2]https://archive.midrange.com/opensource.

Help support midrange.com by shopping at amazon.com with our affiliate
link: [3]https://amazon.midrange.com

References

Visible links
1. https://lists.midrange.com/mailman/listinfo/opensource
2. https://archive.midrange.com/opensource
3. 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-2021 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.