Created On:  21 December 2012


Sysinternals process monitor is a very powerful system trace tool on Windows. However it can be difficult to diagnose issues due to the volume of the information produced. It is possible to output custom events to the trace from an application so you can give the information you see an application context. The attached example shows how you can output events from a COBOL application.


The help for procmon details how you can inject application trace messages to procmon. However the example code is C based. The attachment to this article contains a COBOL example that details how you can utilise this functionality from COBOL.

If you start procmon and run the example code then you will see events from the COBOL application in the trace:-

To see the events to also need to enable to process profiling events on the toolbar:-