呼叫并执行Contributor Macro的方法有多种,如Trigger,epMacroExecutor.exe等,各有其方便和实用之处。

      如果用Trigger则一旦呼叫Macro成功则返回Successful, 而不管Macro在执行的过程中是否某个步骤执行失败;而epMacroExecutor.exe则在呼叫成功Macro以后并等待Macro执行完成,如果全部成功则返回Successful, 如果某一个步骤执行失败则返回Failed。

      epMacroExecutor.exe 执行Macro的方法:

      "D:\ProgramFiles\Cognos84\c8\bin\epMacroExecutor.exe" Weekly_Forecast_2009_Macro

      如果我们想在Macro执行失败以后立即发送邮件,可以下载一个 bmail 组件

      以下是一个完整的epMacroExecutor.exe的例子:

SampleECHO OFF

CLS

"D:\ProgramFiles\Cognos84\c8\bin\epMacroExecutor.exe" Weekly_Forecast_2009_Macro
IF ERRORLEVEL 1 GOTO ExceptionDetectedSettingUpLabel
IF ERRORLEVEL 2 GOTO ExceptionDetectedExecutingLabel
ECHO Succeeded
GOTO EndLabel
:ExceptionDetectedSettingUpLabel
bmail -s S7EFE01 -p 25 -t Jason.K.Li@Newegg.com -f bi@Newegg.com -h -a "(Info) Planning Job Failed" -b "Hi Jason , One of the Cognos planning Contributor Macro steps is failed.  Please investigate the cause and fix it. Thanks."
GOTO EndLabel
:EndLabel

pause


至于epMacroExecutor.exe呼叫执行远程Contributor Macro目前还未找到方法,望知情朋友不吝赐教!

Saturday, August 01, 2009

相关文章:

  • 2021-05-29
  • 2021-08-03
  • 2021-11-25
  • 2022-12-23
  • 2021-07-20
  • 2021-11-27
猜你喜欢
  • 2022-12-23
  • 2021-05-16
  • 2023-04-01
  • 2021-12-09
  • 2022-02-10
  • 2021-09-10
相关资源
相似解决方案