Rich,
A class will always run in the current context, that being the current namespace. You can, however, programmatically switch namespaces to change the context you are running in. The command to do this is
$XECUTE 'ZNSPACE "new namespace"'
Just be sure to switch back to the namespace you started from when that section of code is complete.
Richard S Taylor
Sales Engineer
InterSystems Corporation
Office: 443-340-8614
FAX: 440-815-5805
-----Original Message-----
From: intersystems-mv@googlegroups.com [mailto:intersystems-mv@googlegroups.com] On Behalf Of Rich Brim
Sent: Friday, February 03, 2012 2:35 PM
To: InterSystems: MV Community
Subject: [InterSystems-MV] Can I specify namespace when opening an object in mvb basic program
I wrote a routine that I am running in a namespace to process payments
in telnet session. Rather than logging to each namespace and running,
can I somehow specify namespace? I would do this with a q-pointer in
non OOP.
payobj = "MVFILE.PAYMENT"->%OpenId(id)
thanks,
Rich
--
You received this message because you are subscribed to the Google Groups "InterSystems: MV Community" group.
To post to this group, send email to CacheMV@googlegroups.com
To unsubscribe from this group, send email to CacheMV-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/CacheMV?hl=en