Stop Service on Multiplatforms
The Stop Service (MQCMD_STOP_SERVICE) command stops an existing IBM MQ service definition that is running.
Required parameters
- ServiceName (MQCFST)
- Service name (parameter identifier: MQCA_SERVICE_NAME).
This parameter is the name of the service definition to be stopped. The maximum length of the string is MQ_OBJECT_NAME_LENGTH.
Optional parameters
- MQIACF_IGNORE_STATE
- This parameter allows you to specify whether we want the command to return an error return code, if the object is already in the state the command would move it to. Possible values are:
- MQIS_NO
- If the service being stopped is already in that state, the command returns RC=10. This is the existing behavior, and NO is the default value.
- MQIS_YES
- If the service being stopped is already in that state, the command returns RC=0. The return code is the case as if the service is not running.
Error codes
This command might return the following error codes in the response format header, in addition to the values shown on page Error codes applicable to all commands.
- Reason (MQLONG)
- The value can be any of the following values:
- MQRCCF_NO_STOP_CMD
- The StopCommand parameter of the service is blank.
- MQRCCF_SERVICE_STOPPED
- Service is not running.
Parent topic: Definitions of the Programmable Command Formats