Home

 

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:

  1. The command service object is defined, using the following 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 supplied command to write to the system log.

    • +QMNAME+ is a token representing the name of the queue manager.

 

Parent topic:

Examples on using service objects


fa11470_


 

Home