Hello,
As the data in the tables is very dynamic so there is data discrepancy most of the time between the parent and the child table.
Sorry, but this is nonsense. . .
Some of the systems i've supported do millions of transactions an hour and there is
never an out-of-sync.
If the data is/gets out of sync, it is just a poor implementation and needs to be fixed - not detected later. There is no good reason to have the data out-of-sync.
If you want the process to be user-friendly, you need to fix the process so that it does not corrupt the user's data.
You may find some way to use rexx, but your time would be better spent preventing the problem.