Another advanced (and handy) feature to be aware of is the TurboIntegrator ExecuteProcess function.
This is a very useful function. It allows you to execute a TI process from within a TI process. (Obviously, you cannot have a process call itself).
The format is as follows:
• ExecuteProcess(ProcessName, [ParamName1, ParamValue1, ParamName2, ParamValue2]);
The function will return a real value that you should always test for an acceptable return code value (and do something appropriate based upon this value).
The most important return values to know are as follows:
• ProcessExitNormal(): If your ExcuteProcess returns this, it indicates that the process executed normally.
• ProcessExitMinorError(): If your ExcuteProcess returns this, it indicates that the process executed successfully but encountered minor errors.
• ProcessExitByQuit(): If your ExcuteProcess returns this, it indicates that the process exited because of an explicit quit command.
• ProcessExitWithMessage(): If your ExcuteProcess returns this, it indicates that the process exited normally, with a message written to Tm1smsg.log.
• ProcessExitSeriousError(): If your ExcuteProcess returns this, it indicates that the process exited because of a serious error.
A very simple example of using ExecuteProcess and checking the return code value would be:
returnvalue = ExecuteProcess(‘load_surfboard_daily_sales’);
if (returnvalue = ProcessExitSeriousError() )
ASCIIOutput(ExcpetionFile, sSeriousErrorMsg);
endif;
You can read more about IBM Cognos TM1 scripting in my book, “IBM Cognos TM1 Developer’s Certification Guide [Paperback]“.
Great post,
It’s worth noting that Windows UAC will block TM1 from performing certain operations. E.g. in Server 2008 it’s pretty hard to get TM1 to stop or start a service like advisor or EV