+

Search Tips | Advanced Search

DEFINE SERVICE on Multiplatforms

Use the MQSC command DEFINE SERVICE to define a new IBM MQ service definition, and set its parameters.


Use MQSC commands

For information on how we use MQSC commands, see Performing local administration tasks using MQSC commands.

Values shown above the main line in the railroad diagram are the defaults supplied with IBM MQ, but your installation might have changed them. See Syntax diagrams.

DEFINE SERVICE

DEFINE SERVICE ( name ) define attrsservice attrsDefine attrsDESCR(' ')DESCR(string)LIKE(service-name)NOREPLACEREPLACEService attrsCONTROL(MANUAL)CONTROL(QMGR)CONTROL(STARTONLY)SERVTYPE(COMMAND)SERVTYPE(SERVER)STARTARG(' ')STARTARG(string)STARTCMD(' ')STARTCMD(string)STDERR(' ')STDERR(string)STDOUT(' ')STDOUT(string)STOPARG(' ')STOPARG(string)STOPCMD(' ')STOPCMD(string)


Usage notes

A service is used to define the user programs that are to be started and stopped when the queue manager is started and stopped. We can also start and stop these programs by issuing the START SERVICE and STOP SERVICE commands.

Attention: This command allows a user to run an arbitrary command with mqm authority. If granted rights to use this command, a malicious or careless user could define a service which damages your systems or data, for example, by deleting essential files.

For more information about services, see Services.


Parameter descriptions for DEFINE SERVICE

The parameter descriptions apply to the ALTER SERVICE and DEFINE SERVICE commands, with the following exceptions:

Replaceable inserts can be used for any of the STARTCMD, STARTARG, STOPCMD, STOPARG, STDOUT or STDERR strings, for more information, see Replaceable inserts on service definitions.