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



Scott,

I guess what I don't understand is how doing it dynamically is of any
benefit.

Why not just:
  
   procToUse = LookupProc(fieldsNeededToDetermine);
   select;
     when procToUse = PROC1;
       Process1();
     when procToUse = PROC2;
       Process2();
     //and so on
   endsl;

I supposed I could understand doing it dynamically if there's a large
number of different processes or perhaps more importantly, the users
need to be able to changed the "assigned" process often.

But coming from an X12 EDI background, it would seem to me that the
process for a given XML document would be pretty static.


I don't doubt Aaron's got a good reason for doing it the way he his, I'm
just trying to understand the reason.  As I mentioned before, I've never
needed to do it.

One idea I came up with is basically pseudo-inheritance.  You could have
a base version of a service program in a base library, then individual
locations and/or versions could have there own version of the base
service programs procedures in the individual's own service program.

Seems like that would get pretty complex, and you'd lose some of the
compiler and run-time checking advantages the "regular" use of service
programs give you.


Thanks,
Charles Wilt
--
iSeries Systems Administrator / Developer
Mitsubishi Electric Automotive America
ph: 513-573-4343
fax: 513-398-1121
  

> -----Original Message-----
> From: rpg400-l-bounces@xxxxxxxxxxxx 
> [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement
> Sent: Tuesday, May 09, 2006 3:30 PM
> To: RPG programming on the AS400 / iSeries
> Subject: Re: Dynamically activing bound programs (was RE: 
> Calling a Functionfrom RPG Program having multiple Functions)
> 
> Hi Charles,
> 
> > I don't see anything here that requires the manual activation of a
> > service program and the use of procedures pointers to call the
> > procedures.
> 
> It sounds to me like Aaron is reading some sort of key from an XML 
> document, using that to look up a service program & 
> subprocedure name in a 
> database, and then handing off control to that subprocedure.
> 
> Since he's looking up the names in a database at run-time, 
> he'd have to 
> dynamically call the procedures.
> 
> It was the following paragraph (from Aaron) that made me think that:
> 
> >> PGM1 receives in a request and determines what program should be
> >> called to  process the xml based on DB2 entries. PGM1 then 
> "activates" 
> >> PGM2 SUBPROCEURE1 and "hands off" the parsing of the 
> request and the
> >> composing of the response.
> 
> -- 
> This is the RPG programming on the AS400 / iSeries (RPG400-L) 
> mailing list
> To post a message email: RPG400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
> or email: RPG400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.
> 
> 


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.