Launch MV routine from DOS

1 view
Skip to first unread message

Leon Stokes

unread,
Aug 22, 2013, 9:20:32 PM8/22/13
to InterSy...@googlegroups.com
Hi All,

Does anyone know how to launch a Cache MV routine using a dos command?

I need to run  MV routines remotely using the SysInternals paexec utility. I'm working in a mixed Universe and Cache environment and this is how I remotely launch a Universe routine.

Example: paexec <\\Computer> -w <PathOfUVAccount> uv "<MVProgramName> <arg1> <arg2> ..."

What I need is a Cache equivalent of:   uv "<MVProgramName> <arg1> <arg2> ..."

Thanks

Leon Stokes
World Information Systems

Edward Clark

unread,
Aug 23, 2013, 11:21:42 AM8/23/13
to InterSy...@googlegroups.com
You can use the ccontrol command, which is in the instance's bin directory. If you run it with no arguments, it opens a browser window with a list of the options (the page it opens is in the help directory.) For example:
 
  c:\intersystems\cache\bin\ccontrol.exe console testinst %SYS.MV user
 
will open a windows console and run the mv shell in namespace user on instance testint.
ccontrol expects a rountine, not a command, so you need to use the routine ^%SYS.MV instead of the command MV. You also need to do some quoting if you pass arguments, to get past DOS's command handling:
 
  c:\intersystems\cache\bin\ccontrol.exe console testinst "%SYS.MV(\"LIST VOC\")" user
 
The quotes around the "LIST VOC" need to be escaped with backslashes, and the entire routine name needs to be quoted because of the space inside.
 
You'll might want to use your own routine rather than ^%SYS.MV, by putting the #PRAGMA ROUTINENAME into a basic program.
You will probably want to use the "runw" option instead of "console" 


From: InterSy...@googlegroups.com [mailto:InterSy...@googlegroups.com] On Behalf Of Leon Stokes
Sent: Thursday, August 22, 2013 9:21 PM
To: InterSy...@googlegroups.com
Subject: [InterSystems-MV] Launch MV routine from DOS

--
You received this message because you are subscribed to the Google Groups "InterSystems: MV Community" group.
---
You received this message because you are subscribed to the Google Groups "InterSystems: MV Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to InterSystems-...@googlegroups.com.
To post to this group, send email to InterSy...@googlegroups.com.
Visit this group at http://groups.google.com/group/InterSystems-MV.
For more options, visit https://groups.google.com/groups/opt_out.
Reply all
Reply to author
Forward
0 new messages