COGNOiSe.com - The IBM Cognos Community

Planning & Consolidation => COGNOS Planning => Topic started by: satay2hot on 02 Apr 2009 12:14:21 AM

Title: COGNOS PLANNING MANAGER dos script
Post by: satay2hot on 02 Apr 2009 12:14:21 AM
Does anyone what is the script to invoke an admin link in the CAC from the MANAGER?

Many thanks for your help

Cheers
Vincent
Title: Re: COGNOS PLANNING MANAGER dos script
Post by: StuartS on 02 Apr 2009 02:57:38 AM
I am not aware you can run admin links from a link in a manager screen.

You can use epMacroExecutor.exe in the \program files\cognos\cer4\bin directory to run macros in CAC from a link in a manager screen.  But you need to be running on the server in order to use this exe file.  It will not run from a client machine.
Title: Re: COGNOS PLANNING MANAGER dos script
Post by: mrobby on 02 Apr 2009 12:10:29 PM
The trick is to put the admin link into a macro then execute the macro.  This can be done from a command line on a client machine but requires a workaround.  This workaround requires that the client has access to the server location planning is installed on.

The command to run a macro is
"D:\Program Files\Cognos\cer4\bin\epMacroExecutor.exe" /Macro=pad/[Pad Name Here]/macro/[Maco Name Herer]

I believe Stuart is right though about having to execute the .exe from the local machine.

The way around that is to create the command line and save it as a .bat file on the server.  Then schedule the .bat file in windows scheduler but don't actually use a timed schedule.  Set the user to execute the .bat file as a user that has rights to execute the macro in the CAC.

Then use this in the command line for execution in the manager screen.
SCHTASKS /Run /S [Server Name Here] /TN ["Schedule Task Name Here"]

Basically what you have done is created a button that executes a scheduled task.  Since the scheduled task will then execute the .bat file on the server itself, the macro will kick off.
Title: Re: COGNOS PLANNING MANAGER dos script
Post by: satay2hot on 08 Apr 2009 05:46:04 AM
mrobby and Stuart   ;D

epMacroexecutor command script is the one I am looking for. Many thanks for the help!

Cheers
Vincent
Title: Re: COGNOS PLANNING MANAGER dos script
Post by: jan.herout on 08 Apr 2009 10:00:23 AM
Yes, this is possible, but is it a good idea?

If you run your links like this, the user may will not realize if the admin link run or fails... Yes, admin links can sometimes fail.

CAC is my prefered alternative.
Title: Re: COGNOS PLANNING MANAGER dos script
Post by: mrobby on 08 Apr 2009 12:14:10 PM
This is true but if you really need to notify users wether or not a macro has failed or not you can check tables within the model for this.  I can't remember exactly but it should be possible to trigger an e mail if the macro fails.
Title: Re: COGNOS PLANNING MANAGER dos script
Post by: jan.herout on 09 Apr 2009 01:06:46 AM
Yes, it's possible, but it sounds complicated, plus you would need Event Studio, wouldn't you? Still, CAC is my preferrence for this one.