IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to change the key value in IMS DB


IBM Mainframe Forums -> IMS DB/DC
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rohit4u

New User


Joined: 06 Oct 2006
Posts: 6

PostPosted: Mon Oct 29, 2007 7:37 pm
Reply with quote

Hi,

I want to change the key value in a segment. Suppose PART MASTER is the parent segment and part number is the key and I want to change the first 6 characters of the part number. under that parent there are some child segments also...

So it would be great if some body could tell me how to achieve this?

Thanks in advance.

Regards,
Rohit.
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Mon Oct 29, 2007 7:54 pm
Reply with quote

You cannot "change" a key value. You would need to save all the information from the parent and all child segments. Then you would create new segments. Then you would go back to the original segment and issue delete for the root - all segments beneath that root would be deleted automatically.
Back to top
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Mon Oct 29, 2007 9:20 pm
Reply with quote

Quote:
want to change the key value in a segment

Segment Key - CANNOT be CHANGED.
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Tue Oct 30, 2007 2:36 am
Reply with quote

IMS functions with "pointers". Twin forward - twin backward - twin backward forward. When you are inserting segments, IMS keeps track of where and who you belong with. The main thing - as I have always said - is positioning. IMS knows where you are based on your position in the database - and the internal "pointers". If you try to rewrite a key value - you would be lost - IMS will not allow that. It's a lot like VSAM - VSAM is a grandparent of IMS.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IMS DB/DC

 


Similar Topics
Topic Forum Replies
No new posts 3270 personal communications. Can't c... TSO/ISPF 2
No new posts SELECT from data change table DB2 5
No new posts Trying to change copybook in online c... CICS 4
No new posts Change Default Scroll Setting TSO/ISPF 1
No new posts Change history of vsam file. JCL & VSAM 3
Search our Forums:

Back to Top