× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



The unzipping is a super small part of the project... so no unfortunately.
Like I said, it's not a dealbreaker and the file will only be used to track
down errors when debugging.


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

On Sat, Dec 28, 2019 at 9:41 AM Bryan Dietz <bdietz400@xxxxxxxxx> wrote:

Is there any way to run the entire process from a PASE shell?

it may help with some of ccsid issues.

Bryan

B Stone wrote on 12/27/2019 4:06 PM:
Thanks, Vern!


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

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

wrote:

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';
endif;

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,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: 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-2024 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.