× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Why not store these values into another file, and use a referential
constraint instead of a check constraint or a before trigger? You
mentioned something like the original file did not have a primary key. So,
add one with ADDPFCST. Granted, it was common with ancient software
packages to never put a primary key on a file because of some supposed bug
in V1 of CPF on the S/38, but, you know, I think we're past that.

If you don't want to mess with the table file containing the values, then
copy the records to a new file that DOES have a primary key. And put a
trigger on the existing table file that any new maintenance will update
the duplicate table. This way you do not have to modify the vendor code
to sync the two files.

ie, if your values are in this table
create table ROB/ValueTable (
ValueCode char(3),
ValueDesc char(20),
primary key (ValueCode))

and you want to ensure that they match in this file
create table ROB/DataTable (
DataKey int,
DataDesc char(20),
ValueCode char(3),
primary key (DataKey),
foreign key (ValueCode) references ValueTable(ValueCode))

Then just set it up like that.

Rob Berendt

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.