Starting a Routine from the Windows command prompt using ccontrol
Greetings.
I'm currently struggling with launching a routine from the command prompt using ccontrol.
Basically I have a routine with a parameter which works fine using the following:
ccontrol cterminal ^ANDYTST(\"c:\temp\\\") USER
This receives c:\temp\ then in the routine.
However, when there is a space inside the parameter it assumes that it receives a script.
I can still run it using ccontrol terminal, but that then tells me the argument is invalid.
Therefore, is there something like a placeholder for whitespaces?
And, is it possible to hand it the credentials?
Or is there a better way to launch a routine from an external script?
I could do it via a TcpClient and telnet but that's a bit clumsy and I'd prefer not to go down that route.
Thanks in advance
Andy
For batch/shell scripts, ccontrol runw may be better. You can see all the options with:
With ccontrol runw, spaces are accepted; for example, this should work (after replacing <instancename> with the name of your Caché instance):
I'm not sure if there are options other than OS authentication (which, if enabled, has such commands run as the Caché user matching the OS-level username).
This post may also be relevant: https://community.intersystems.com/post/how-return-status-code-cache-pro...
Hi.
Thanks a lot for your answer. Maybe it's an issue with the procedure itself then which can't handle the whitespace.
I'll check that with my colleague.
(Would have said thanks earlier but I didn't receive a mail despite having notifications turned on)
Happy to help. :-)
To clarify, I think it's a difference between ccontrol terminal and ccontrol runw - ccontrol terminal wouldn't accept spaces for me either.