Sort of like back in my old mainframe days. All files had some free space on the end for fields to be added later.
Scott
-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Denis Robitaille
Sent: Tuesday, February 28, 2017 9:18 AM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: RE: Articles or links to build a case on why to improve your rpg-db2 database.
Several years ago I had to solve a similar problem.
How to be able to add field to a file without having to recompile all programs that access it and still keeping level check.
I think that my solution might be applicable to you.
In the file, I added a field at the end (this is the only time I have to recompile all programs). It is a *CHAR file of a big length (let say 500).
I also have define a DS (Data structure) that I can /copy in RPG programs that define the content of this extention field.
So, when I need a new field (whatever the type), I change the DS and that's it.
Naturally, all programs that need access to the new field are recompiled. All other are untouched and continue working.
If I ever uses all the space available, I must then modify the file which will force a recompile. But it may take a while before I reach that point.
The main draw back is that the filed defined in the DS can not be used as key.
Denis Robitaille
Chef de service TI - Solution d'entreprise
Infrastructure et opérations
CASCADES CENTRE DES TECHNOLOGIES
412 Marie Victorin
Kingsey falls(Québec) Canada J0A 1B0
Tél : 819 363 6100 Poste :52130
Cell : 819 352 9362
-----Message d'origine-----
De : MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] De la part de JRusling@xxxxxxxxxxx
Envoyé : 28 février 2017 09:28
À : midrange-l@xxxxxxxxxxxx
Objet : RE: Articles or links to build a case on why to improve your rpg-db2 database.
Yes, this is suitable, in some some cases -- just so the extra fields, when used, get documented that they are being used & for what purpose. -:-)
One way to reduce the extension files is to create the first extension
with a
selection of unassigned fields-- several numeric, some alpha, some
date--
so you don't need to add multiple extensions to a single data base
file...
Paul E Musselman
PaulMmn@xxxxxxxxxxxxxxxxxxxx
<br />
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else is
unauthorized. If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance on it, is
prohibited and may be unlawful.
As an Amazon Associate we earn from qualifying purchases.