COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: eballinger75 on 21 Oct 2016 01:00:00 PM

Title: Execute Windows Batch file from Cognos
Post by: eballinger75 on 21 Oct 2016 01:00:00 PM
Hi Guys,

I would like to be able to execute a windows batch file from within Cognos. Does anyone know a way to do this with any of the Cognos applications. I know this can be done with Data Manager but we are losing this tool with our move to 10.2.2. So I would like to be able to call a system command from report studio or event studio perhaps. If anyone knows a way please post.

Thanks,

Title: Re: Execute Windows Batch file from Cognos
Post by: BigChris on 25 Oct 2016 02:03:16 AM
I've never tried it, but if you can get the batch file into a stored procedure you should be able to bring that into Cognos via Framework Manager.
Title: Re: Execute Windows Batch file from Cognos
Post by: dougp on 26 Oct 2016 01:19:25 PM
Create a web page with server-side stuff (aspx, jsp, etc.) that runs the bat file.  Add an HTML item (or drill-through definition?) to the report page and craft it in such a way that the hyperlink includes all of the required parameters for the querystring.
Title: Re: Execute Windows Batch file from Cognos
Post by: bdbits on 27 Oct 2016 12:05:03 PM
Executing a batch file from a stored procedure is possible, but most DBAs will not open security to enable that due to some serious security implications.

What is your batch file doing? Perhaps there is another way to accomplish what is needed.