DocClose Macro
A macro that performs cleanup operations required
after running the DocOpen macro.
Discussion
Use this macro when you want IBM® Cognos® PowerPlay® to perform closing activities, such as
- deleting any unused or empty files
- notifying the user when the macro has completed
- saving, or prompting the user to save, a file that should be saved
If this macro exists in the Macros directory, it runs only when you exit the report. For example, to delete any temporary files when PowerPlay closes a report, include scripting in the DocClose.mac administrative macro file.
Requirements
The only function that must be included in the macro is the Main subroutine.
A central administrator should maintain this macro in the Macros directory specified in the PowerPlay Preferences dialog box.
Example
This example displays a message box with the words "DocClose Macro" to indicate the macro has run.
Sub Main
msgbox "DocClose Macro"
End sub