The Cognos macro language is a third party tool called SouthBridge Data Language (you can even find references in the docs to 'SBL'). This is a product from a company called Mystic River Software. They offer no direct support or documentation at all. The product itself is supposed to be code compatible with MS Visual Basic version 3. Any older documentation for that product would serve as a good starting point. There is also a good 'macro cookbook' of examples provided by Cognos with the product, but it hardly scratches the surface of what you can do with macros.
Hope this helps,
Dave Griffin