i don't have the code but it is something i know i could use as well!!!
Thanks,
Tommy Holden
"albartell" <albartell@xxxxxxxxx> 
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
06/27/2007 09:49 AM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
To
"'RPG programming on the AS400 / iSeries'" <rpg400-l@xxxxxxxxxxxx>
cc
Subject
RPG "code crawler and resource resolver"
Hi everyone,
 
I am working on a project where I need to programmatically gather
information about an RPG *PGM's/*SRVPGM's input and output parameters. 
Take
the following code for example:
 
     p Cust_getRec     b                   export
     d Cust_getRec     pi
     d  pError                             like(Cust_Error)
     d  pCustRec                           likeds(CM)
     d  pCustNbr                           like(CM.CUSTNBR)
      /free
 
         clear pError;
         clear pCustRec;
         chain(n) pCustNbr CUSTMST;
         if not %found;
           pError = 'Customer Not Found';
         else;
           pCustRec = CM;
         endif;
 
      /end-free
     p                 e
 
I was confident in the ease of gathering this information until I came
across keywords LIKEDS/LIKE/etc.  This obviously means that source 
crawlers
would have to crawl even further to find the definition of the LIKExx
keywords - pretty much performing the steps of a compiler for resource
resolution.  I was intrigued by the PCML one could generate during a 
compile
until I found out it threw errors when "illegal PCML parameters" were used
(i.e. using a non-int pass-back parm). 
 
Here is what I am wondering... does anybody have code developed to
appropriately query an existing prototype/procedureinterface/*ENTRY*PLIST
source that they would be willing to share?  You don't have to post it
online, if necessary contact me offline: aaronbartell at gmail dot com.
 
Thanks in advance,
Aaron Bartell
http://mowyourlawn.com
As an Amazon Associate we earn from qualifying purchases.