|
Any time you can use a variable instead of a hard-coded value, that's
a significant gain in flexibility. One simple convenience the EXTFILE
keyword provides is the ability to do what amounts to OVRDBF, but
without a separate CLP.
In principle, you can actually do much more powerful things, like get
user input within your RPG program, and have that very same program
choose different files to open (so long as their record formats are
compatible) based on that user input. I don't know if there was a way
to choose a file at run-time before the EXTFILE keyword (V5R1), but
even if there was, it was surely much more difficult and convoluted.
EXTDESC is even newer, and is comparatively less powerful. It's a
convenience, saving you from having to have the compile-time file with
the proper name in the proper place in the library list. For example,
suppose you have four existing files: LIB1/FILEA, LIB1/FILEB,
LIB2/FILEA, and LIB2/FILEB. LIB1/FILEA is not compatible with
LIB2/FILEA and LIB1/FILEB is not compatible with LIB2/FILEB. If your
program needs to be compiled with LIB1/FILEA and LIB2/FILEB, it is
much trickier (or at least much more annoying) to accomplish without
the EXTDESC keyword.
John
--
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.