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



-----Message d'origine-----
De : midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] De la part de Simon Coulter

The primary purpose of using an I/O module is to remove the tight
coupling between program and file. If you simply read into a
matching
data structures and return that to your caller then you have done
nothing to reduce the level of coupling. Change the file, change the
DS, recompile all then consumers. You gained nothing. Since basic
physics says you can't get something for nothing the "cost" of de-
coupling all but one program from a given file is some increase in
"complexity" but really, the complexity is isolated to one program
(the I/O server module) and isn't that complex anyway.


I'm trying to imagine what the code would look like in RPG?

In i/o module, I hard code the equivalent of the client record to be returned to the caller :

D ClientDS_V1 DS QUALIFIED
D Field1

The client file gets changed, so I add a new version of this DS :

D ClientDS_V2 DS QUALIFIED
D Field1
D Field2


Caller :

CallP GetClient_V1 ( ClientDS : Error );


In the called procedure, each modification of the client file would mean duplication of the last version plus the modification. Or would it be called like this with the version as a parameter :

CallP GetClient_V1 ( ClientDS : version : Error ); If this way, how would you return the right DS?



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.