QueueQuery — Query Waiting Message Count

QueueQuery
retcode
reascode
queue_handle
match_key
match_key_length
message_count

Purpose

Use the QueueQuery function to count the messages waiting in a queue.

Parameters

retcode
(output,INT,4) is a variable where the function stores the return code.
reascode
(output,INT,4) is a variable where the function stores the reason code.
queue_handle
(input,INT,4) is a variable for specifying the handle of the queue to be queried.
match_key
(input,CHAR,match_key_length) is a variable for specifying the key to be matched against the keys of messages in the queue.
match_key_length
(input,INT,4) is a variable for specifying the length of match_key.
message_count
(output,INT,4) is a variable where the function returns the number of messages that reside in the specified queue and whose key matches the specified match key.

Usage Notes

  1. Specify the match-all match key to determine the total number of messages in the queue.

Return Codes and Reason Codes

Return Code Reason Code Meaning
vm_ipc_success vm_ipc_success QueueQuery completed successfully
vm_ipc_error vm_ipc_bad_handle Invalid queue_handle
vm_ipc_error vm_ipc_bad_key_len Invalid match_key_length
vm_ipc_error vm_ipc_not_authorized Not authorized for operation
vm_ipc_error vm_ipc_queue_deleted Queue was deleted

Programming Language Bindings

Language Language Binding File
C VMCIPC H
Assembler VMASMIPC MACRO
REXX VMREXIPC COPY