Ram�n Jim�nez wrote:
> > While $O(^ooPINsD(oldPINId))'="" {
> > Set oldPINId=$O(^ooPINsD(oldPINId))
> ...
> > Kill ^ooPINsD(oldPINId)
> ...
> > Set ^ooPINsD(BusinessId,oldPINId)=PINPropList
>
> is it safe to kill and set a global within a $O() traversal?
No. Kill before Set is the first clue that something is amiss.
> in general what would happen if the newly set node
> collates before the next node to be visited?
Actually if it collates anywhere after the current "old" node.
> does it work internally so that this
> doesn't affect it?
No. If the source and target are the same, it's a bug.
> what I've done is set to a new global,
> then kill and merge the whole thing after the $O()
Yes, that is a much better practice.