Use a command service object
This example shows how to define a command service object to start a program that writes entries to the operating system's system log when a queue manager is started or stopped.
- The command service object is defined, using the DEFINE SERVICE MQSC command:
DEFINE SERVICE(S2) + CONTROL(QMGR) + SERVTYPE(COMMAND) + STARTCMD('/usr/bin/logger') + STARTARG('Queue manager +QMNAME+ starting') + STOPCMD('/usr/bin/logger') + STOPARG('Queue manager +QMNAME+ stopping')
Where:- logger is the UNIX and Linux system supplied command to write to the system log.
- +QMNAME+ is a token representing the name of the queue manager.
Parent topic: Examples of using service objects
Related information