David (and others)
There's an issue I once came across when I was (even more of a) rookie doing MUMPS and have never quite solved. In this code:
While $O(^ooPINsD(oldPINId))'="" {
Set oldPINId=$O(^ooPINsD(oldPINId))
(snip)
Kill ^ooPINsD(oldPINId)
(snip)
Set ^ooPINsD(BusinessId,oldPINId)=PINPropList
is it safe to kill and set a global within a $O() traversal? I mean, I'm not sure in this particular case, but in general what would happen if the newly set node collates before the next node to be visited? Would you alter the $ORDER() sequence or does it work internally so that this doesn't affect it? (Can't imagine how)
I've never even tried it myself, what I've done is set to a new global, then kill and merge the whole thing after the $O (copying any non-processed nodes verbatim to the new global). Then again I was quite scared to mess up serious data back then :P But to this day I keep the habit... Opinions?
Ram�n
-- ZCacheLib - Open Source Extensions for Cach� http://www.zcachelib.org
