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



How much data are we talking about passing?

You could do this a couple of ways depending on how independent each
screen can/needs to be will depend on your approach.

1) Make each set of display records that are related into its own display
file. Then create a module/procedure for processing each screen. Just
pass the data/parameters to the procedure and return the F3/F12 (Exit or
Return) values so that the previous screen knows what it should do (if
exit then immediately return its exit or if return then allow processing
to continue from here). This works best if each screen can act as a mini
program in and of its self.

2)Make one module with multiple procedures and a single display file. This
is better if the program is tightly integrated or dependent on previous
screens... these are good for maintenance programs, order entry, etc.

If you have lots of data you can have it in an array and pass pointers, or
if its not a lot you can just pass it through parameters using regular
variables or even data structures.

Thanks
Bryce Martin
Programmer/Analyst I
570-546-4777



Jeff Young <cooljeff913@xxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
06/30/2011 09:14 AM
Please respond to
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>


To
rpg400-l@xxxxxxxxxxxx
cc

Subject
Modernising a monolith ile program






I have an old ILE RPG program that uses subprocedures and service
programs, but
performs multiple separate and distinct functions. This program is an
interactive program that uses a display file with multiple formats for
each
function.
What is the best way to separate the separate functions into modules and
then
bind into one program?
Some of the functions depend on common data that is derived from the
initial
parms 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
not
used?
How do I pass the common data needed between modules?

Thanks,

Jeff Young
Sr. Programmer Analyst

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.