Update the key of a root segment in IMS DB



IBM's hierarchical database management system with a Database Manager (IMS DB) and a Transaction Manager(IMS DC)

Update the key of a root segment in IMS DB

Postby priya_joisher » Fri Mar 25, 2011 3:11 am

Hi,

I have a scenario where i need to update the key of all the root segments satisfying a certain criteria.
i am using one PCB for for the get-nxt call and another PCB for segment delete and insert. My Q is:- wont the position of the first PCB be corrupted since i am deleting and inserting the roots at the same time? Also is there a better way to update the key of a root segment??

Appreciate your time.
Thanks,
Priya.
priya_joisher
 
Posts: 2
Joined: Fri Mar 25, 2011 2:49 am
Has thanked: 0 time
Been thanked: 0 time

Re: Update the key of a root segment in IMS DB

Postby NicC » Fri Mar 25, 2011 10:47 am

2 ways - possibly more
1: Unload all those roots and their children, if required, update the information in the root and reload.
Using the same criteria used to unload, now go through and delete.
2: Basically the same but do not bother with the unload - do all the updates first then go back and do all the deletes.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Update the key of a root segment in IMS DB

Postby priya_joisher » Mon Mar 28, 2011 8:03 am

Thanks for the response Nic.
I am going to unload all roots and their children and then update the root keys as requred. Then load the whole thing and then run a Reorg.

Regards,
Priya.
priya_joisher
 
Posts: 2
Joined: Fri Mar 25, 2011 2:49 am
Has thanked: 0 time
Been thanked: 0 time

Re: Update the key of a root segment in IMS DB

Postby DFSHDC40 » Wed Mar 30, 2011 4:39 am

If you are changing the keys - are you going to load or insert the new records ?
[may need to do some extra bits ]
If the code hasn't been changed, why is the LKED date today?
User avatar
DFSHDC40
 
Posts: 41
Joined: Sat Oct 16, 2010 4:16 pm
Location: IMS.SDFSRESL
Has thanked: 0 time
Been thanked: 0 time

Re: Update the key of a root segment in IMS DB

Postby DFSHDC40 » Wed Mar 30, 2011 4:40 am

PS if its a big DB and only a few changes are being made - potentially a less than efficient process
If the code hasn't been changed, why is the LKED date today?
User avatar
DFSHDC40
 
Posts: 41
Joined: Sat Oct 16, 2010 4:16 pm
Location: IMS.SDFSRESL
Has thanked: 0 time
Been thanked: 0 time


Return to IMS DB/DC

 


  • Related topics
    Replies
    Views
    Last post