× 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 only (potential) issue I can see using this approach is that if you are
not using XML tooling then it becomes possible to insert text into the tags
that would not be allowed by a parser.

I mention this because I have done similar things in the past but got
bitten on at least one occasion.

On Fri, Sep 7, 2018 at 6:11 AM Justin Taylor <JUSTIN@xxxxxxxxxxxxx> wrote:

Perfect! This works like a champ:
sed 's|<XML_Tag />|<XML_Tag>value_here</XML_Tag>|' sed_test > sed_test_out


I heard back from IBM, and a new PTF (SI68235) is required to fix a known
issue with the RPG ON-EXIT command.


Thanks guy!




-----Original Message-----
From: Tyler, Matt [mailto:matt.tyler@xxxxxxxxxxxxxx]
Sent: Thursday, September 06, 2018 11:44 AM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: RE: Replace text in XML file

This is what sed is meant for.
https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/rzahz/rzahzsed.htm

-Matt


-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of
Justin Taylor
Sent: Thursday, September 6, 2018 10:27 AM
To: MIDRANGE-L (midrange-l@xxxxxxxxxxxx) <midrange-l@xxxxxxxxxxxx>
Subject: Replace text in XML file

I have an XML IFS file < 1 MB in size. I need to replace an empty tag.
This is within an existing RPG pgm, so I figured it would be simple enough
to use the IFS API's to read the file, manipulate the text and write it
back out. Well I managed to crash the compiler (seriously.. dump spooled
files, WRKPRB entry, the works). While I wait on IBM support, I decided to
go looking for a better option. About all I've found is talk about
XML-INTO & XML-SAX to deserialize XML. That isn't really practical here,
since my input and output will both be IFS files.

Any suggestions?
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit:
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.midrange.com_mailman_listinfo_midrange-2Dl&d=DwICAg&c=2S-2xx8Cum_thMfWs-kOOHQTwolPvSZ4PFLhr1wDDGs&r=wgq2KO1Tl8HswJht2RKpmz7qvL2YDU_M-VhnRH6r43I&m=da65CEERY19sDGADP6PKEKCRWput1VRa0DNoo0sFatM&s=J7VuGiBB3BNceb4nnfUVKu5D0lCpwMvQcHI65T5N7_0&e=
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at
https://urldefense.proofpoint.com/v2/url?u=https-3A__archive.midrange.com_midrange-2Dl&d=DwICAg&c=2S-2xx8Cum_thMfWs-kOOHQTwolPvSZ4PFLhr1wDDGs&r=wgq2KO1Tl8HswJht2RKpmz7qvL2YDU_M-VhnRH6r43I&m=da65CEERY19sDGADP6PKEKCRWput1VRa0DNoo0sFatM&s=RkvSvOii_4Y-s6HMG78yQpJ9O5kWNkCDqlJEbidaBYA&e=
.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link:
https://urldefense.proofpoint.com/v2/url?u=http-3A__amzn.to_2dEadiD&d=DwICAg&c=2S-2xx8Cum_thMfWs-kOOHQTwolPvSZ4PFLhr1wDDGs&r=wgq2KO1Tl8HswJht2RKpmz7qvL2YDU_M-VhnRH6r43I&m=da65CEERY19sDGADP6PKEKCRWput1VRa0DNoo0sFatM&s=ym1M8gm5_vrMmbWihzg0Mjm3JvtWZmG3y3fiydmWjcc&e=

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
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: http://amzn.to/2dEadiD




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.