Page 1 of 1

Update the key of a root segment in IMS DB

PostPosted: Fri Mar 25, 2011 3:11 am
by priya_joisher
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.

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

PostPosted: Fri Mar 25, 2011 10:47 am
by NicC
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.

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

PostPosted: Mon Mar 28, 2011 8:03 am
by priya_joisher
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.

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

PostPosted: Wed Mar 30, 2011 4:39 am
by DFSHDC40
If you are changing the keys - are you going to load or insert the new records ?
[may need to do some extra bits ]

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

PostPosted: Wed Mar 30, 2011 4:40 am
by DFSHDC40
PS if its a big DB and only a few changes are being made - potentially a less than efficient process