Created On:  2010-03-17

Problem:

I prefer that my COBOL application sends a message to a local Windows user or to a local or remote Windows computer to inform, for example if a specific event occurrs such as an error. How do I proceed?

Resolution:

Please find the code attached to this KB.  Simply use the Microsoft command Net Send.

See that the demonstration attached uses an Error handler and the RTS error which occurs in the code is sent as an Alert message.  Note that the Net Send Microsoft command implies the Microsoft Service named “Messenger” to be started.  (Microsoft Service Messenger:  Transmits net send and alerter service messages between clients and servers. This service is not related to Windows Messenger. If this service is stopped, Alerter messages will not be transmitted.)