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:
Thanks, Vern!

Bradley V. Stone
Native IBM i e-Mail solutions for Microsoft Office 365, Gmail, or any Cloud

On Fri, Dec 27, 2019 at 2:42 PM Vernon Hamberg <vhamberg@xxxxxxxxxxxxxxx>

H Brad

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) + ',' +
%char(pLineTo) +
' s/' + pSearchFor +
'/' + pReplaceWith + '/';

if pReplaceAll;
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.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by 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.