The following services are written with UNIX style path separator characters, except where otherwise stated.
This example shows how to define, use, and alter, a server service object to start a trigger monitor.
DEFINE SERVICE(S1) + CONTROL(QMGR) + SERVTYPE(SERVER) + STARTCMD('+MQ_INSTALL_PATH+/bin/runqmtrm') + STARTARG('-m +QMNAME+ -i ACCOUNTS.INITIATION.QUEUE') STOPCMD('+MQ_INSTALL_PATH+/bin/amqsstop') + STOPARG('-m +QMNAME+ -p +MQ_SERVER_PID')Where:
START SERVICE(S1)
DISPLAY SVSTATUS(S1)
ALTER SERVICE(S1) + STARTARG('-m +QMNAME+ -i JUPITER.INITIATION.QUEUE')
STOP SERVICE(S1)Followed by:
START SERVICE(S1)The server service process is restarted and picks up the alterations made in 4.
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:
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:
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 stopped only:
DEFINE SERVICE(S3) + CONTROL(QMGR) + SERVTYPE(COMMAND) + STOPCMD('user/bin/logger') + STOPARG('Queue manager +QMNAME+ stopping')Where:
This example is written with Windows style path separator characters.
This example shows how to define a server service object to start a program called runserv when a queue manager is started. One of the arguments that is to be passed to the starting program is a string containing a space. This argument needs to be passed as a single string. To achieve this, double quotes are used as shown in the following command to define the command service object:
DEFINE SERVICE(S1) SERVTYPE(SERVER) CONTROL(QMGR) STARTCMD('C:\Program Files\Tools\runserv.exe') STARTARG('-m +QMNAME+ -d "C:\Program Files\Tools\"') STDOUT('C:\Program Files\Tools\+MQ_SERVICE_NAME+.out') DEFINE SERVICE(S4) + CONTROL(QMGR) + SERVTYPE(SERVER) + STARTCMD('C:\Program Files\Tools\runserv.exe') + STARTARG('-m +QMNAME+ -d "C:\Program Files\Tools\"') + STDOUT('C:\Program Files\Tools\+MQ_SERVICE_NAME+.out')Where:
Notices |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
servegs |