× 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 11-Jun-08, at 10:32 AM, midrange-l-request@xxxxxxxxxxxx wrote:

Now number and street (ds table entries) are out of sync with attnline (ds table entries). We would want attnline(2) to load as blanks. However, it doesn't and it continues to read until it finds the next attnLine and loads into the next variable.

How do we get the table entries to be in synch?

This is really an RPG question Robert but ...

Your problem in part is that you are using multiple XML-INTOs - you should really only be using one with nested DS arrays for the repeatable elements. You've laid the DSs out correctly but then targeted them individually.

I've only taken a very quick look look but the DS for your structure should be something like this.

D Responses DS Qualified
D error
D resultCode
D responseMessage
D response LikeDS(response) Dim(MaxResponsePossible)

D response DS Qualified
D refNum
D requestID
D sucess
D error
D resultCode
D addressLine1 LikeDS(addressLine1) Dim(MaxAddressPossible)
D addressLine2 LikeDS(addressLine2) Dim(MaxAddressPossible)

D addressLine1 DS
D number
D street

D addressLine2 DS etc. etc.

The XML-INTO is then simply XML-INTO Responses. Or if the DS is too big that way you would have to do a separate XML-INTO with %Handler targeting the response DS would would then be DIM'd.

Is this an in-house XML doc design? It seems to me you still have a problem in that there is no formal correlation between addressLine1 and 2. Id' have expected an enclosing element of Address or something to "hold" the address lines. Without it you'd have to use XML-SAX I suspect to be able to match the line 1 and 2 data.

Please respond on RPG400 if you have more ?s


Jon Paris

www.Partner400.com
www.SystemiDeveloper.com



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.