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



Greetings from South Carolina.


One of the employee programmers at my current client is writing some RPG XML code and needs some assistance. We have consulted the textbooks we have inhouse and need further wisdom. If you have a few minutes, we need a fresh set of eyes to review the code. The relevant sections are:


D Event DS Qualified Dim(100)
D EventDateTime 20A
D EventType 10A
D Application 10A

* Define The Location/Name Of The XML File
D XMLFile S 35A Varying
D Inz('/BILLYTEST/SECPYV5.TXT')

* Define The Options To Be Used When Receiving The XML Data
D Options S 100A Varying
D Inz('doc=file case=any -
D allowextra=yes -
D allowmissing=yes -
D path=events/event')

D HadBlank S N Inz
D HelpMe S 10A

D HandleEvent PR 10I 0
D FoundBlankID N
D EventX LikeDS(Event) Dim(500) Const
D NumEvents 10I 0 Value

* Retrieve The XML Into The Pre-Defined Data Structure
* xml-into Eventds %xml(XMLFile : Options);
* xml-into custds %xml(XMLFile : Optionsc);

/Free

XML-Into(E) %Handler(HandleEvent :HadBlank)
%XML(XMLFile :Options); // Load Events DS

<<< stuff happens here >>>

*InLR = *On; // End Program
Return; // Return To Caller

/End-Free

**********
* HandleEvent
**********
*
P HandleEvent B
D PI 10I 0
D FoundBlankID N
D EventX LikeDS(Event) Dim(500) Const
D NumEvents 10I 0 Value
D i S 10I 0

/Free

<<< stuff happens here >>>

Return 0;

/End-Free

P HandleEvent E


The amount of data being passed exceeds what the program can handle in one pass, so it must be broken up and processed in sections. I'm looking for an example of how that should be done.

Thanks,



Robert Munday
Montgomery, AL
on assignment in Columbia, SC
looking for the next gig...



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.