Question
· Apr 13, 2016

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

Discussion (3)0
Log in or sign up to continue

For batch/shell scripts, ccontrol runw may be better. You can see all the options with:

ccontrol help

With ccontrol runw, spaces are accepted; for example, this should work (after replacing <instancename> with the name of your Caché instance):

ccontrol runw <instancename> ^ANDYTST(\"c:\folder with spaces\\\") USER

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...