Hi David, interesting!

I can provide two things: an advice and some source code (it's an RPG not

About the advice, PCML it's basically Xml without steroids. Try to add to
the string the missing pieces and you get a useable Xml object:

Pcml = '<?xml version="1.0" encoding="UTF-8"?>';

entry_off = rcvr.offset_First_Entry;
for i = 1 to rcvr.Number_Entries;
pEntry = pRcvr + entry_off;
entry_off = entry.Offset_Next_Entry;
pEntryData = pRcvr + entry.Offset_Interface_Info;
Pcml += %subst(EntryData:1:entry.Interface_Info_Length_Ret);

About the source code (I understand you took Java's route) we have a
working extractor that takes care of all data definitions (that are NOT in
the interfaces) and replies to the caller with the exploded interface. If
you plan to port this project also to RPG I can strip down (and translate)
the code. As usual the problem with RPG is that it doesn't play well with
complex structures so the basic definitions to return to the caller are...
huge or complex.

Last hint, if you plan to use PCML and Service Programs you can vote this


Since IBM accepted the RFE, we can hope for a better interface to call SRV
procedures without the 7 parm's limit.

Marco Facchinetti

Mr S.r.l.

Tel. 035 962885
Cel. 393 9620498

Skype: facchinettimarco

Il giorno gio 30 apr 2020 alle ore 21:46 David Gibbs via JAVA400-L <
java400-l@xxxxxxxxxxxxxxxxxx> ha scritto:


I've started a small open source project on github to implement something
been wanting to do for quite a while.

Basically, it's a utility class that will retrieve the PCML from a *PGM or
*SRVPGM object who's modules were created using PGMINFO(*PCML:*MODULE).

Currently it can return a string containing the PCML source, a Document
based on the PCML, or a ProgramCallDocument object.

If there are multiple modules in a service program that contain PCML, it
them all together.

It's hosted on github ... here's the URL:

I'm just getting the hang of github ... dealing with the functions is
more time than I thought it would.

Testing has only been moderate so far ... but if you care to take a look,
value any input.


IBM i on Power Systems: For when you can't afford to be out of business!

I'm riding in the American Diabetes Association's Tour de Cure to raise
for diabetes research, education, advocacy, and awareness. You can make a
tax-deductible donation to my ride by visiting

You can see where my donations come from by visiting my interactive
donation map
... https://mideml.diabetessucks.net/map (it's a geeky thing).

I may have diabetes, but diabetes doesn't have me!
This is the Java Programming on and around the IBM i (JAVA400-L) mailing
To post a message email: JAVA400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/java400-l.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 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].