The current application has a key that is built by using field keys of other files. This worked very well in the past, but now the key requires changing too much since this key has many relationships between the other files keeping everything synchronized is tedious. A brief example: I have a product master that maintains a multitude of manufacturer’s products, part of the key in the product master is the manufacturer code field from another file. The way companies are buying other companies today this once stable field is no longer and when it needs changing, 13 other files are affected.
So my question what is the best way to maintain a unique key in a series of related files if there is no applicative primary key? And is this the best way?
I have not programmed (RPG) in over twenty years, but I oversee IT operations so when I bring a contract programmer in I need to ensure this file be simplified. I have read using the RRN is not a good idea, but my thought is to just use a numeric number and just keep the other fields that are currently part of the key “free” to update on demand.
And how in today’s RPG code does one exactly auto create this unique key? Sorry if I appear a little out of it, it’s been a while.
So my question what is the best way to maintain a unique key in a series of related files if there is no applicative primary key? And is this the best way?
I have not programmed (RPG) in over twenty years, but I oversee IT operations so when I bring a contract programmer in I need to ensure this file be simplified. I have read using the RRN is not a good idea, but my thought is to just use a numeric number and just keep the other fields that are currently part of the key “free” to update on demand.
And how in today’s RPG code does one exactly auto create this unique key? Sorry if I appear a little out of it, it’s been a while.
Comment