Is there any way to run the entire process from a PASE shell?
it may help with some of ccsid issues.
B Stone wrote on 12/27/2019 4:06 PM:
Bradley V. Stone
Native IBM i e-Mail solutions for Microsoft Office 365, Gmail, or any
On Fri, Dec 27, 2019 at 2:42 PM Vernon Hamberg <vhamberg@xxxxxxxxxxxxxxx
Here's the thing I did to get UTF-8 output in QShell, which doesn't
natively do that - this is in a RPGLE program where I have to modify a
value in an XML file (for and XLSX file) that I don't know until I've
finished processing all the rows.
sedCmd = 'QSH CMD(+
''export QIBM_CCSID=1208 +
&& sed "' + %char(pLineFrom) + ',' +
' s/' + pSearchFor +
'/' + pReplaceWith + '/';
sedCmd += 'g';
sedCmd += '" ' + pFile + ' > /tmp/temp' + jobNbr + '.tmp +
&& mv /tmp/temp' + jobNbr + '.tmp ' + pFile +
The command becomes something like this -
export QIBM_CCSID=1208 && sed "5, 6 s/tagname/realvalue/g" pFile >
/tmp/temp123456.tmp && mv /tmp/temp123456.tmp pFile
The point here is that the && continuations put everything in the same
QShell job - I think that mattered when I first found this solution for
replacing the changes from sed into the from file - Qshell version of
sed does not have the "replace-in-place" option that other versions of
sed do - and I don't remember if PASE' version does, or if there were
other problems I had.
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,
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
Please contact support@xxxxxxxxxxxx for any subscription related
Help support midrange.com by shopping at amazon.com with our affiliate
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.