× 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.



On Wed, Aug 19, 2020 at 1:52 PM Greg Wilburn
<gwilburn@xxxxxxxxxxxxxxxxxxxxxxx> wrote:

I not only need to scan/replace for '^XZ', I need to add a string of my own (literals and variable data) followed by '^XZ'.
(basically inserting a string at the end of the data to print some extra lines on the label)

Preferably, I would like to do this before writing to the IFS.

I empathize, but it pains me to read that last part, because this
whole thing (from retrieving the SOAP data to writing to IFS) screams
out for a PASE-based solution (Python, Node.js, or possibly Java).

If you have successfully written the stream file, with the '^XZ' at
the end, and only need to insert your own data; at that point, you can
probably just issue a single QSH command to finish the job. (I don't
know the Unixy stuff too well, so I'd write a few lines of Python.)

I understand that it would be preferable to stick to RPG, given that
you've already done so much of it in RPG, and probably don't want to
learn a whole new language so close to the end; but wrestling with
CCSIDs on top of Base64 encoding/decoding is more of a headache in RPG
than in tools/languages that were specifically designed for working
with stream files.

I do hope and expect that someone or a combination of someones will be
able to help get you home while staying within RPG (possibly including
embedded SQL). Good luck!

John Y.

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.