Thanks Brian,
Actually I have seen another solution that is already in production in our shop.
There is an RPGLE that receives 5 optional parameters (*nopass) each the same attributes. It the calls a CLLE that then calls RPG procedures based on the parameters that are used. It seems a bit messy, however with the parameters named PARM1, 2, etc. and not easy to mantain.
I like the idea of the data area. I will always have the scenario RPGLE1 calls CLLE which calls RPGLE2. As RPGLE1 knows that RPGLE2 will be called, I can have a data area named RPGLE1. Any parameter modifications and I only need to modify RPGLE1 and RPGLE2. If I also have RPGLE3 that calls CLLE that calls RPGLE4 they will not need to be touched. The CLLE will not need to know anything about the parameters, it's function is just to ensure that the second RPGLE is called in the right environment.
Have you a preference? Anyone else find any potential problems with these solutions?
-----Message d'origine-----
De : midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] De la part de BMay@xxxxxxxxx
Envoyé : jeudi 8 janvier 2009 16:41
À : midrange-l@xxxxxxxxxxxx
Objet : RE: ACTGRP
David,
You are correct that varying parameter lists will be a problem. AFAIK, you would need to do one of the following things to make this work:
1. Modify all programs that will be called this way to have the same parameter list. Maybe a really big character field that each caller and callee can overlay with it's own datastructure.
2. Modify all programs to pass parameters via a data area.
3. Load parameter data into a table in QTEMP to be read in by the called program.
There will definitely be some reworking involved, but it is definitely doable.
Brian May
Project Lead
Management Information Systems
Garan, Incorporated
Starkville, Mississippi
Young i Professionals
http://www.youngiprofessionals.com
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at
http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.