I'm using the runtime to run MS scripts from SQL Server jobs. At the end of my MS scripts, I want to return exit codes, so that my calling script can branch to the correct next step, depending on success, failure and the nature of the failure. The problem is, that doesn't seem to work:
A compiled macro! What about the runtime? What can I do instead, given that I cannot run compiled scripts? Here's the only thing I can think of:Exit>[return_code]
Immediately terminates the current script. When used in a compiled macro you can set the executable's return code with return_code.
Code: Select all
Let>IGNOREERRORS=1
...
//Force a crash
If>v_exit_code>0
Let>IGNOREERRORS=0
Add>a,b
Endif
EDIT: I think I understand why you might not want to return error codes to Windows/DOS from the Editor, but I wonder if that is something technically difficult to do with the runtime, or if you just never considered including that feature. If it's the latter, it would be useful for the same reasons I'd want to step through scripts in the runtime.
Thanks.