+1
Scott
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Charles Wilt
Sent: Thursday, August 23, 2012 1:27 PM
To: Midrange Systems Technical Discussion
Subject: Re: how to create logical file with one key over two fields
Actually, you're _WAY_ better off explicitly defining the fields in the
logical.
In fact, every logical should have fields explicitly defined and every
program should be using a logical never the physical.
Why? Simple, lets say you want to add a couple new fields, and out of
200 programs using the file only two need the new fields.
With explicitly defined fields in the logicals and all access via
logical, you can just add the fields to the physical and create a new
logical with the existing and new fields and change just the two
programs. You don't have to even recompile anything else! Even if you
have a CMS that makes recompiles easy, a recompiled program still needs
to be tested. Unless you happen to be the only RPG shop in the world
with 100% automated regression testing, reducing the number of programs
you need to test is a great idea... :)
Yes, you'll have extra logicals around, _BUT_ those new field logicals
have basically no overhead since they will presumably share the same key
as an existing logical; and the i automatically shares the access path
of the original with the new. The overhead of logicals comes from
maintenance of the access paths.
HTH,
Charles
On Thu, Aug 23, 2012 at 2:41 PM, Stone, Joel <Joel.Stone@xxxxxxxxxx>
wrote:
Problems are:
1) I am forced to name each field in the DDS. I would like it to
pull in all fields so the file is interchangeable in pgms with the PF.
If someone adds a field to the product file in the future, the pgms
would not get the new fields.
And to NOT have to name each field that I want included in the LF; ie
I would like to take ALL fields from the PF without individually naming
each field?
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at
http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.