|
Jon,
isn't it just a "shared ODP" ?
On Thu, Nov 4, 2010 at 5:45 PM, Jon Paris<jon.paris@xxxxxxxxxxxxxx> wrote:
Comments in-line
Jon Paris
www.Partner400.com<http://www.partner400.com/>
www.SystemiDeveloper.com<http://www.systemideveloper.com/>
On Nov 4, 2010, at 9:48 AM, rpg400-l-request@xxxxxxxxxxxx wrote:
Would that be that it permits having all file operations in the1) It avoids the file being opened multiple times (file open is
callee? With the file having to be declared in both caller and
callee, I don't really get the advantage.
relatively expensive)
2) It makes it possible to write more generic routines for file
handling (think subfiles for example) that take advantage of the fact
that the current cursor position comes "with" the file.
There are a bunch more but these are the main ones. Like a lot of new
functionality the usage is not always immediately apparent, becuase
we've got used to building things a certain way. We tend to constrain
our designs to fit the mental set of "tools" that we have. If you were
to reverse the scenario and ask a C programmer (for example) how they
would design an application in a scenario where they could _not_ pass
files as parms they would be astounded that you could even contemplate
such a restrictive scenario.
Also, WHAT exactly is being passed as the first parameter? Why isWhat is passed? Nothing that is of any use to you other than for its
the file template not in the caller instead of the callee? What's
the advantage over declaring the files in both caller and callee and
passing only 2 parameters, the key and the record? Thanks!
intended purpose. It is an internal reference to the associated
entries in the RPG run-time. Think c-style file handle. The file
itself has to be defined (and is "owned") by the first program in the
chain. Any subsequent program/procedure in the chain needs to know
what the file looks like hence the need for the template. The
advantage as I've already noted is that only one open is done.
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
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.