Sure116 Beginner
Joined: 25 May 2004 Posts: 2 Topics: 1
|
Posted: Sat Oct 13, 2007 7:46 pm Post subject: How Can I change Primary key value of IMS segment |
|
|
I have a requirement where I need to change all the keys of database with new values.
i.e., We have database called PURDSUP in which SUPLID is root segment and key is SUPNO of 10 bytes.
Till now we are storing only 5 bytes in SUPNO (eg : 12345 ,abcde .)
But all these SUPNO are mapped to 10 digit SUPNO in oracle.
And Oracle use to have cross ref. table where they can map 5 digit supno to their required 10 byte.
Now our requirement is to make both MF and Oracle key values same.
Current: MF SUPNO 12345 ---> Oracle SUPNO 123456789
My new requirement is I will have both the above values in a file and I need to change 12345 to 123456789. Which means I need to change primary key values of entire database.
Please suggest me how can I proceed. _________________ Suresh Gummalla |
|
Southington Beginner
Joined: 02 Jun 2006 Posts: 6 Topics: 0 Location: Phoenix AZ
|
Posted: Fri Oct 19, 2007 4:30 pm Post subject: |
|
|
I think you may have to get the root, GU/GN and all its children, GNP, save all these segments, put in your new key, and insert the root and all its children again. Then go back and GHU/GHN the original root and delete it, DLET. This will automatically delete all the children too. This might take a while, but you should ony have to do it once. Any other programs that create new root segments should use the Oracle key. Otherwise, you'll have to keep running this program over and over. |
|