Hi Dragan,
I don't think it has anything to do with a prg. You've probably noticed that moving the mouse changes the datasession in the Watch window. I think Christof's datasession rules outlined on the Wiki explain the situation. I strongly believe that SET DATASESSION TO something should be avoided and in its place just instantiate inside session objects where you have that need.
>One thing which may be happening is that a .prg called from a form is switching to the default datasession. I'm not sure of this, though I've observed it often while debugging. Still, can't say what would be the rule.
Charlie