MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How Can I change Primary key value of IMS segment

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> IMS
View previous topic :: View next topic  
Author Message
Sure116
Beginner


Joined: 25 May 2004
Posts: 2
Topics: 1

PostPosted: Sat Oct 13, 2007 7:46 pm    Post subject: How Can I change Primary key value of IMS segment Reply with quote

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
Back to top
View user's profile Send private message Send e-mail
Southington
Beginner


Joined: 02 Jun 2006
Posts: 6
Topics: 0
Location: Phoenix AZ

PostPosted: Fri Oct 19, 2007 4:30 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> IMS All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group