Re: New open source project: PCMLTOOLS

Marco Facchinetti <marco.facchinetti-kthxv0ud/[email protected]>
Newsgroups gmane.comp.lang.as400.java
Message-ID <CAMsgu4ongaAS4LeLWvc2rrJ5o4OfOOnLdyLqJtV4po8YH2sGow@mail.gmail.com>
Hi David, interesting!

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

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);
endfor;

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
RFE:

https://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=135628


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

HTH
--
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 <
[email protected]> ha scritto:

> Folks:
>
> I've started a small open source project on github to implement something
> I've
> 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
> object
> based on the PCML, or a ProgramCallDocument object.
>
> If there are multiple modules in a service program that contain PCML, it
> merges
> them all together.
>
> It's hosted on github ... here's the URL:
> https://github.com/fallingrock/pcmltools
>
> I'm just getting the hang of github ... dealing with the functions is
> taking
> more time than I thought it would.
>
> Testing has only been moderate so far ... but if you care to take a look,
> I'd
> value any input.
>
> david
>
> --
> 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
> money
> for diabetes research, education, advocacy, and awareness.  You can make a
> tax-deductible donation to my ride by visiting
> https://mideml.diabetessucks.net.
>
> 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
> list
> To post a message email: [email protected]
> To subscribe, unsubscribe, or change list options,
> visit: https://lists.midrange.com/mailman/listinfo/java400-l
> or email: JAVA400-L-request-+hD5IHI5Xscn3HwCXmMcX9BPR1lH4CV8@public.gmane.org
> 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 is the Java Programming on and around the IBM i (JAVA400-L) mailing list
To post a message email: [email protected]
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request-+hD5IHI5Xscn3HwCXmMcX9BPR1lH4CV8@public.gmane.org
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.