Inquire Service Status

The Inquire Service Status (MQCMD_INQUIRE_SERVICE_STATUS) command inquires about the status of one or more IBM® MQ service instances.

HP Integrity NonStop Server IBM i UNIX and Linux® Windows z/OS®
  X X X  

Required parameters

ServiceName (MQCFST)
Service name (parameter identifier: MQCA_SERVICE_NAME).

Generic service names are supported. A generic name is a character string followed by an asterisk (*), for example ABC*, and it selects all services having names that start with the selected character string. An asterisk on its own matches all possible names.

The service name is always returned, regardless of the attributes requested.

The maximum length of the string is MQ_OBJECT_NAME_LENGTH.

Optional parameters (Inquire Service Status)

IntegerFilterCommand (MQCFIF)
Integer filter command descriptor. The parameter identifier must be any integer type parameter allowed in ServiceStatusAttrs except MQIACF_ALL. Use this parameter to restrict the output from the command by specifying a filter condition. See MQCFIF - PCF integer filter parameter for information about using this filter condition.

If you specify an integer filter, you cannot also specify a string filter using the StringFilterCommand parameter.

ServiceStatusAttrs (MQCFIL)
Service status attributes (parameter identifier: MQIACF_SERVICE_STATUS_ATTRS).
The attribute list can specify the following value on its own - is the default value used if the parameter is not specified:
MQIACF_ALL
All attributes.

or a combination of the following:

MQCA_SERVICE_DESC
Description of service definition.
MQCA_SERVICE_NAME
Name of service definition.
MQCA_SERVICE_START_ARGS
The arguments to pass to the service program.
MQCA_SERVICE_START_COMMAND
The name of the program to run to start the service.
MQCA_SERVICE_STOP_ARGS
The arguments to pass to the stop command to stop the service.
MQCA_SERVICE_STOP_COMMAND
The name of the program to run to stop the service.
MQCA_STDERR_DESTINATION
Destination of standard error for the process.
MQCA_STDOUT_DESTINATION
Destination of standard output for the process.
MQCACF_SERVICE_START_DATE
The date on which the service was started.
MQCACF_SERVICE_START_TIME
The time at which the service was started.
MQIA_SERVICE_CONTROL
How the service is to be started and stopped.
MQIA_SERVICE_TYPE
The mode in which the service is to run.
MQIACF_PROCESS_ID
The process identifier of the operating system task under which this service is executing.
MQIACF_SERVICE_STATUS
Status of the service.
StringFilterCommand (MQCFSF)
String filter command descriptor. The parameter identifier must be any string type parameter allowed in ServiceStatusAttrs except MQCA_SERVICE_NAME. Use this parameter to restrict the output from the command by specifying a filter condition. See MQCFSF - PCF string filter parameter for information about using this filter condition.

If you specify a string filter, you cannot also specify an integer filter using the IntegerFilterCommand parameter.

Error codes

This command might return the following error code in the response format header, in addition to the values shown in Error codes applicable to all commands.

Reason (MQLONG)
The value can be any of the following values:
MQRCCF_SERV_STATUS_NOT_FOUND
Service status not found.