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.
As an Amazon Associate we earn from qualifying purchases.
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
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.