kereni
27th May 2003, 14:42
Hi,

I want to make easily way to change the company number after copy company instead to use the tfgld9xxxm000 sessions.
The process of changing the company number taking a lot of time using the tfgld9xxxm000 and fill the Informix logs and data files, especially the tfgld tables.

1. Can I use a script to replace the "old" company number string to "new" on selected files with separator?

2. Is there any available script to do that?

3. Do I have to run the tfgld9xxxm000 sessions after loading the "fixed" tables files?

Thanks,
Kereni

norwim
27th May 2003, 15:43
Hi there,

as always, I recommend to use awk.
You will have to do the work though to identify the fieldnumbers of the fields that are populated with the company number.
This is the hard work.
Once you know the tables and their fields, it will be very easy to write a script that changes all these fields.
It will even be possible to write a script that scans the dd-files to determine tablefields that contain company-numbers.
With grep -l tcncmp * in the $dict/dtfgld I find that 39 files might contain companynumbers - so it seems advisable to automate the process.
If you want to start on this one and need help, email me
now@niederrhein.de

good luck

NvanBeest
27th May 2003, 17:14
Be careful! Not only tcncmp should be changed! There are more domains containing the company number. (In total 5 if I remember correctly)

As soon as I have a bit more time, I will upload a script that, for BaanIV, does exactly what you require. It scans the dd, dumps and fixes the necessary files, and posts them to the new company. The version I have only works for single-single companies at present, but does this very well.

Regards,
Nico