MQCMD_STOP_SERVICE (Stop Service) on Multiplatforms
The Stop Service (MQCMD_STOP_SERVICE) PCF 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
- Specifies whether the command fails if the service is already stopped. The possible values are:
- MQIS_NO
- The command fails if the service is already stopped. This is the default value.
- MQIS_YES
- The command succeeds regardless of the current state of the service.
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.