If you omit this file from the
Subset it will be simplified by having fewer fields. The creation and
maintenance effort for the user views is similarly reduced. The size
of EVERY program which uses this group is reduced (a possible
performance factor). If the file has 30 fields, but your Subset needs
only one of these, you can leave the file out of the Subset design and
evaluate the field as a derived field using a user written I/O module.
The internal processing overhead is reduced to the tune of
approximately 200 fewer HLL program instructions for every record read
at this level of the Subset hierarchy (ie. if the average execution of
a report on this Subset (using this file in two links) might expect to
process 5,000 records for this group, then the program will execute
approximately 1 million fewer HLL program instructions. The size and
efficiency of every program that reads this file is improved by up to
this margin. The time to load the Subset (when this is necessary from
time to time) is reduced.
Solution 1 - An I/O module
You can write a simple re-entrant I/O program to process this file.
Then, create derived fields for those fields from the file that you
require and use the logic to invoke your I/O module to return values
for fields. The major advantage of this methodology is the insulation
of the Subset, and all its reports, from the database in this file.
Should the file ever change, you need only alter/re-compile your I/O
module - the Subset and all the report programs are unaffected.
If using this technique, you should also consider the use of
DERIVED instance macros. If you define a single macro to call your I/O
module, you can attach this macro to the Derived field. If the
situation arose in other Subsets, the same Derived macro would serve
your purpose.
Solution 2 - Create a new logical file, that shares the current
access path and has only the field(s) your require, and link this into
the Subset instead.
There is no overhead and the only extra work is defining the
logical file. The creation of the fields into the Subset is done
entirely by the Retrieval map function. It is simple and requires no
special effort.