Posted: Tue Aug 24, 2004 2:55 am Post subject: question about program using two pcb
A program use two pcb,one with "GO" access mode to scan db,another with "A" access mode to delete or update segment if the segment is match the condition.
After delete some segment, issue sync to avoid buffer overflow. then issue GU to repositon(recorded the restart point) .and then issue GN contine to scan db, but sometims GN will get the segment that has been delete. why?
???
Joined: 03 Jan 2003 Posts: 550 Topics: 23 Location: Michigan, USA
Posted: Tue Aug 24, 2004 10:03 am Post subject:
The use of two PCBs is a method used to prevent excessive locking. The first PCB will read, but not lock, each segment in the database. Once a matching condition has been met, a GHU will be issued against the second PCB and a delete will be issued.
The Checkpoint is issued after a given number of deletes to apply the deletes and release any locks. Unfortunately, the Checkpoint will also reset the pointers which is why the GU is issued against the first PCB.
A DLET call will not actually delete the segment, rather it will prevent further access to it but there are exceptions depending on whether you are using physical or logical delete rules and whether the segment is involved in a logical relationship. The rules that govern how this is done are specified in the DBD and are explained in the Administration Guide:Database Manager.
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