Future Proof File Designs/Methods
Ernesto_CASARES@paribas.com
Ernesto_CASARES@paribas.com
Wed, 16 Jun 1999 21:01:31 +0200
The Background :
Powerhouse 7.29
HP Image
The Dream :
Having a file design or approach which will easily allow future expandability
with minimal impact to Powerhouse programs (ie recreating datasets, recompiling,
etc).
The Obvious Approach, Right ? :
Have a record layout such as below :-
ELEMENT PRIMARYKEY CHAR SIZE 5
ELEMENT FILLER200 CHAR SIZE 200
ELEMENT DATA1 CHAR SIZE 2
ELEMENT DATA2 CHAR SIZE 2
RECORD TEST
ITEM PRIMARYKEY
ITEM FILLER200
BEGIN STRUCTURE
ITEM DATA1
ITEM DATA2
END STRUCTURE
This structure, in theory, will allow you to use the items DATA1, DATA2 to store
what you know currently,
and still allow you to use the remaining 196 characters of the FILLER200 item
for future needs. However, if I had the
following programs :
SCREEN A1KP
FILE TEST
FIELD PRIMARYKEY
FIELD DATA1
FIELD DATA2
SUBSCREEN A2KP PASSING TEST
BUILD
SCREEN A2KP RECEIVING TEST
FILE TEST MASTER
FIELD DATA1
FIELD DATA2
BUILD
And, say in the future I needed another item then I could add DATA3 item such
below :
ELEMENT PRIMARYKEY CHAR SIZE 5
ELEMENT FILLER200 CHAR SIZE 200
ELEMENT DATA1 CHAR SIZE 2
ELEMENT DATA2 CHAR SIZE 2
ELEMENT DATA3 CHAR SIZE 2
RECORD TEST
ITEM PRIMARYKEY
ITEM FILLER200
BEGIN STRUCTURE
ITEM DATA1
ITEM DATA2
ITEM DATA3
END STRUCTURE
The Problems:
Then if I re-run the screens again, without recompiling, it does not error.
However, if say I needed to reference
this new field in A1KP such as below :
SCREEN A1KP
FILE TEST
FIELD PRIMARYKEY
FIELD DATA1
FIELD DATA2
FIELD DATA3
SUBSCREEN A2KP PASSING TEST
BUILD
Then, if I tried running subscreen A2KP from A1KP it would error with a linkage
problem because it is not aware of the new
DATA3 item. I would therefore need to recompile it. But Why ? If I am not
referencing it and the record length has not changed,
why does it care ?
Also, there will be problems in QTP, if, for example, I initially had the
following :
ACCESS TEST
SUBFILE TSTSUB KEEP INC TEST
Then the contents of this subfile will be the following :
PRIMARYKEY
FILLER200
DATA1
DATA2
If I then changed the structure to include DATA3. Then that item would also be
included in the subfile which would affect the
record length of the subfile and you would therefore need to recompile all the
associated programs.
So all in all, its not all that maintenance free using this design. The only
thing that it does seem to save you is having to re-create
the file. You would still need to recompile all the programs accessing the TEST
dataset and and any subfiles that are created
from the TEST dataset, and so on.
Are there any other problems with this technique ?
Does anyone else out there have any other techniques for future proof file
designs ?
Before I will get bombarded with 'Just recompile it ' comments, I want to point
out that this can be quite an exercise when
you are talking about large systems with complicated dependancies.
The Gratitude:
Thank you for your time and suggestions.
Ernie
-----------------------------------------------------------------------------
This message is confidential; its contents do not constitute a
commitment by Paribas except where provided for in a written agreement
between you and Paribas. Any unauthorised disclosure, use or
dissemination, either whole or partial, is prohibited. If you are not
the intended recipient of the message, please notify the sender
immediately.
Ce message est confidentiel ; son contenu ne représente en aucun cas un
engagement de la part de Paribas sous réserve de tout accord conclu par
écrit entre vous et Paribas. Toute publication, utilisation ou
diffusion, même partielle, doit être autorisée préalablement. Si vous
n'êtes pas destinataire de ce message, merci d'en avertir immédiatement
l'expéditeur.
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
powerh-l@lists.swau.edu is gatewayed one-way to bit.listserv.powerh-l
This list is closed, thus to post to the list, you must be a subscriber.