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



Some things mising in this concept, imho, or poorly explained:

a) How does the router know which correct libl to set? Is this not
established by Pgm A? As you sometimes do not pass parameters to the
router, as Pgm B does not need any, the router is helpless in this
scenario. And you never mention, whether or not the passed DS contain data
for the router to work on.
b) If the router is not the generic programme, what pgm is to set up the
appropriate AG for Pgm B?
c) Pgm B does not require parameters, how many calls (PI) are you defining
in the router and/or the generic programme? The router should always
receive two parameters (as sent by Pgm A).
d) You never mention the restore to the original libl in this whole
scenario. When is this going to happen?
eO do you need a pointer for this? Passing the DSes will do.

I think you are talking about different Pgm As, that call the same router.
In that case it still applies: all PIs between Pgm a and router should be
the same. Each PI from the router to any Pgm B is the same.

If you want to use a router between Pgm A and Pgm B then you always need t
pass parameters to the router. The values in those parameters are key to a
file, which have the name of the called Pgm B (and perhaps the name of the
pgm that sets the libl) and call this Pgm B.

I would throw this back to the person responsible for this poor design. I
can think of situatons to use a router, but not one to change libls in one
job.

With regards,
Carel Teijgeler


*********** REPLY SEPARATOR ***********

On 13-10-2009 at 9:48 David FOXWELL wrote:

-----Message d'origine-----
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] De la part de Mark S. Waterbury
Objet : Re: program design problem

Please note that I'm only a humble programmer and the design decision is
not mine.

The calling programs are client management programs that need to run other
programs with a different library list, then return to their initial
state, then recall the same program with a different library list.

Eg Pgm A running with liblst A calls Pgm B which runs with liblst
determined par pgmA, ie, variable.

To solve this problem, the decision was to call a router that would set up
the library list and call a generic program that would run in a named
activation group for pgm B.

So pgmA may be calling pgmB which may run in any of several activation
groups, all active until pgmA ends.

If pgmA needs to pass parameters to pgmB, it defines these parameters in a
DS and passes a pointer to the DS to the router. PgmB copies the DS
definition from pgmA. If there was a way of passing the DS directly, then
I don't know it.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.