MQInquire() function

The MQInquire() function, which is the same as the MQINQ() function of , queries attributes of the queue. The MQInquire() is the interface between your SQL and .

Syntax


1  MQInquire (?  service_name , selector  )
service_name
Optional parameter. Refers to the value in the servicename column of the "informix".mqiservice table. If service_name is not specified, IDS.DEFAULT.SERVICE is used as the service. The maximum size of service_name is 48 bytes.
selector
An integer or character attribute selectors number or string, such as MQCA_* or MQIA_* values that exist in WMQ product documentation or header files. Examples of string values are MQIA_Q_TYPE or MQIA_CURRENT_Q_DEPTH.

Usage

The following table describes how the arguments for the MQInquire() function are interpreted.
Table 1. MQInquire() argument interpretation
Usage Argument interpretation
MQInquire(arg1) arg1 = selector (number or string)
MQInquire(arg1, arg2) arg1 = service_name

arg2 = (number or string)

You can use the MQINQ() selectors of the .

Return codes

A string of LVARCHAR type
The operation was successful.
NULL
No Messages are available.
Error
The operation was unsuccessful.

Examples

The following example shows an integer selector for a queue type:
execute function MQInquire(‘IDS.DEFAULT.SERVICE',20);  -- Queue Type
The following example shows a character attribute selector for a queue type:
execute function MQInquire('MQIA_Q_TYPE');
The following example shows a string selector for queue depth:
execute function MQInquire(‘IDS.DEFAULT.SERVICE',3);
The following example shows a character attribute selector for queue depth:
execute function MQInquire(‘IDS.DEFAULT.SERVICE','
 MQIA_CURRENT_Q_DEPTH');