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



Hi Steve, yes I know that arrays are not the best choice but the client does not have
the Toolkit (and we cannot load software on the AS400 because the box is based elsewhere - and controlled by a third party vendor).


Maybe once they find out how poor the performance will be for this utility program they will buy it
:-)


thanks for the help
Marilyn


From: "Steve Landess" <sjl_123@xxxxxxxxxxx>
To: "RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx>
CC: <plexjob@xxxxxxxxxxx>
Subject: Re: How to scan an entire array all at once
Date: Sun, 2 May 2004 23:51:18 -0500

Marilyn,

IMO, using an array is the wrong approach to solve this problem.

XML documents are not well-suited for handling in an array,
other than an array that in your case would be 1 x 2097152,
so that you could process it one byte at at time in order to parse
it - and I don't think you want to process it this way either!

You need use an XML parser to parse the data in order to
retrieve this information from the XML document.

If still available for V5R1,
you need the XML Toolkit for iSeries (5733-XT1):

http://publib.boulder.ibm.com/iseries/v5r1/ic2924/index.htm?info/rzamj/rzamjmain.htm

See some additional links here:
http://www.as400pro.com/TipsProgTips14.htm#3

Regards,
Steve Landess
Austin, Texas
(512) 423-0935


> "M Boyce" wrote: To: <rpg400-l@xxxxxxxxxxxx> Sent: Friday, April 30, 2004 3:49 PM Subject: How to scan an entire array all at once


> Hello, I have a task that involves scanning a character array (or data
> structure) that is > 8192 long by 256 (basically 2MB of data).
> This data will come from an MQ > message and will consist of a
> series of separate XML messages - 256 of them
> potentially - all strung together in one MQ message.
>
> I want to write a function that will retrieve a subset of the xml message
> namely, the first instance of any element of the xml:
>
> i.e.
>
> <StateGroup> .....
> </StateGroup>
>
> Then I want to be able to remove the extracted subset from the original
data
> and return the rest as well as the extracted xml (in two separate parms).
>
> The problem arises when the xml fragment I want to extract is spread
between
> two array elements.
>
> Any ideas on an approach?
>
> We are using V5R1 and we are also using Advantage Plex to create the
server
> code but for this program I am thinking it would be best to use ILE RPG
and
> just create a wrapper function in Plex (the Plex version we are using does
> not support ILE generation).
>
> Thanks for any and all help you can provide.
>
> Marilyn Boyce

_________________________________________________________________
Add photos to your e-mail with MSN Premium. Get 2 months FREE* http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines



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