|
Vern,on
This program has 7 possible functions, each distinct from each other based
the record in the display file that they are processing. Some of thefunctions
are not stand alone but get called from within another routine and dependon
variables from within that routine. In addition, most of the functionshave a
common function that they execute. How should this be handled?handle
Is it best to keep those together or separate them into separate modules?
Since each of the routines is accessing a display file format, how do I
that from within a module?create
At the present time, there are subprocedures that are common to multiple
functions within the program, but have no revelance outside it. Should I
a service program for them?programs,
All suggestions appreciated.
Thanks,
Jeff Young
Sr. Programmer Analyst
________________________________
From: Vern Hamberg <vhamberg@xxxxxxxxxxx>
To: RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
Sent: Thu, June 30, 2011 9:39:07 AM
Subject: Re: Modernising a monolith ile program
Jeff
Seems we'd need to see more in order to reply well, but I'll give you
just one idea.
To pass common data, use parameters - pass only what is needed in the
module - maybe put it all into a data structure, so there is only one
parameter to pass.
Not sure about separating procedures, but if something is called more
than once, maybe it should be put into a service program.
You call this monolithic - that usually means that everything is in one
code source - that doesn't seem to be the case here, right?
Unless the display functionality is used in other programs, I'd keep it
inside this program - reserve service programs for things that are
needed by several programs - or at least more than one!
I'm not even sure I'd move different display stuff into separate modules
- each would need its own F-spec, right? Maybe what is DONE after doing
the EXFMT and all could be separated, but that could get unwieldy, too,
methinks.
HTH
Vern
On 6/30/2011 8:14 AM, Jeff Young wrote:
I have an old ILE RPG program that uses subprocedures and service
buteach
performs multiple separate and distinct functions. This program is an
interactive program that uses a display file with multiple formats for
thenfunction.
What is the best way to separate the separate functions into modules and
initialbind into one program?
Some of the functions depend on common data that is derived from the
notparms passed to the program.
Should I split my display file into separate files for each function?
Use the full display file in each module and ignore the formats that are
listused?--
How do I pass the common data needed between modules?
Thanks,
Jeff Young
Sr. Programmer Analyst
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
To post a message email: RPG400-L@xxxxxxxxxxxxlist
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.
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
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 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.