COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS Impromptu => Topic started by: bkmz on 21 Apr 2007 12:58:26 AM

Title: .imr rendering automation
Post by: bkmz on 21 Apr 2007 12:58:26 AM
Hi! I have an .imr file and want to automate its processing, i.e. specify output format and destination, get the data and save it. Can I do it using command line utility, so I could use .cmd or .bat file?  I don't want to use the scheduler.

Another question is: can I run two or more reports simultaneously in different processes?

Thanks!
Title: Re: .imr rendering automation
Post by: cognosfreelancer on 24 Apr 2007 01:24:34 PM
You will first need to write a macro that automates the processing.

Next you compile it and create a Windows batch script that calls the compiled macro.

You can run the batch file from the command window.

However you will need to use some scheduler if you want this job to kick off regularly

HTH
NKT
Title: Re: .imr rendering automation
Post by: bkmz on 25 Apr 2007 01:28:33 AM
And the macro is .mac file, compiled macro is .mcx file, right?  I've looked into a .mac file, I believe that I can even use any COM-enabled language, such as vb, windows scripting host, .net with interop etc.

Thank you very much!
Title: Re: .imr rendering automation
Post by: cognosfreelancer on 25 Apr 2007 11:30:07 AM
Yes you are right on target.

I normally use VB and compile my code to an executable.

It is much more pleasurable coding in VB than in Cognos Script Editor. I have no experience with VB.NET though.

Yes it is possible to run multiple reports simultaneously in separate processes. You will need to use COM if writing in VB for this. But it is a pain to write. Also to cordinate the multiple processes you will need to use some sort of a semaphore such as file based semaphore.

NKT
Title: Re: .imr rendering automation
Post by: ranjankumar on 19 Jun 2009 01:49:10 AM
HI ,
i have to automate the impromptu 7.4 reports. based on your discuss it seems it is possible to do with macros .if you have macros to automate the reports please send me the macros . waiting for your reply.