How to run CognosScript macros written in CognosScipt

CognosScript programs (macros) can be written, run, debugged and tested in the CognosScript Editor which comes with the installation of Cognos PowerPlay.
The PowerPlay Macros are saved to a text format and have a mac extension. When the file is run it is automatically compiled to a binary file with has a mcx extension.
Once the script is saved, tested and works stable, it is very likely that there will be a need to run it from the command line. There is a program called runmac32.exe in the \bin\ cognos installation folder which makes it possible to run cognosscipt macros externally.

To run a cognos macro from the command line just type in the following at the command prompt:
"C:\Program Files\Cognos\cer3\bin\runmac32.exe" D:\script.mac

It is also possible to pass a parameter to the script (you'll find an example on how to read the parameter in CognosScript on our pages). It can be done by adding the parameter simply at the end of the command: "C:\Program Files\Cognos\cer3\bin\runmac32.exe" D:\script.mac string_parameter