Strictly from a database design stand point, I try to use an incremental
numeric field, which may or may not be a field used for reporting, as
the primary reference key. The scenario you are describing is a perfect
example of when this technique is useful. I'm not sure if this is an
option for you, but it would certainly simplify this change and future
changes.
With the method you have described, you will either have to change the
primary key to include the new information, or, as you stated, add the
new field to each associate file, rekey with multiple keys, and
recompile every program. That will accomplish the immediate task, but
the same procedure will need to occur if any additional reference keys
are added in the future. By switching to a numeric reference key, you
can make the changes to the associate files once, and only account for
new fields in the primary file. The associate files would not be
dependent on the new field for reference.
Tom Armbruster
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Tom Deskevich
Sent: Thursday, March 25, 2010 5:27 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: Changing the primary key to all the files in a system.
We have a Sheriff system, the key to the file and associate files are
9999-99999-X.
9999=year 99999=number X=system code.
We have a user who is going to start accepting domestic relations cases.
Their key is 9999-99999-X plus a CASE TYPE.
They can have the SAME case number for various case types.
The obvious way to perform this change is go into each file and add the
new
case type as part of the key.
Any other suggestions?
Thanks.
Tom Deskevich
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.