|
To add Referencial Integrity you don't need to understand the details. Just call ADDPFCST [F4] and fill the names of the files and keys. If that causes unexpected problems, you need to either: fix the ofending program (By the way, it is probably the one causing the orphanated recors) or WRPPFCST and delete the constraint. Once your files are clean, RI will prevent to delete a master record unlees you delete the detail firs, it will also prevente a detail record to be written if there is no master. RI will also prevent to update the keys to a value that will leave orphans. Using RI it is not longer valid to write detail records before the master record. ______________________________________________________________________________ fkolmann@revlon.com.au wrote: > > Orphaned records (like people) are caused by the unexpected death of parents. > Program crashes/bugs etc need to be identified and the causes fixed to prevent > further orphans. > > The 'bad/orphaned' records I strip from the live files and transfer to 'error > files' as > the normal purge processes cannot cope with them. This keeps a record of what > happened for auditing purposes. I dont know how to use the referential >integrity, > > I dont understand how it works particularly when records are being 'created', > until all the records > are in place there cannot be intergrity so that implies that Journalling with > Commit/RollBack > needs to be used. The canned software we use has not got Commit hence my > deficiency. <snip> -- Raul A. Jager W. Asuncion - Paraguay +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
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.