QueueDelete — Delete a Queue

QueueDelete
retcode
reascode
queue_name
queue_name_length
export_level

Purpose

Use the QueueDelete function to delete 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_name
(input,CHAR,queue_name_length) is a variable for specifying the name of the queue to be deleted.
queue_name_length
(input,INT,4) is a variable for specifying the length of queue_name.
export_level
(input,INT,4) is a variable for specifying the export level, as follows:
vm_ipc_plevel
Process level
vm_ipc_slevel
Session level
vm_ipc_nlevel
Network level

Usage Notes

  1. Messages residing in a deleted queue are discarded. The invoker of QueueDelete is given a warning if this occurs.
  2. Any thread waiting on the receipt of a discarded message (that is, a thread that used the QueueSendBlock function) is unblocked and given a return and reason code indicating that its message was discarded.
  3. Any thread waiting on a message to arrive on the deleted queue (that is, a thread that used the QueueReceiveBlock function) is unblocked and given a return and reason code indicating that the queue was deleted.
  4. When a process terminates, queues created by the process are deleted.
  5. A process cannot delete its primary queue.

Return Codes and Reason Codes

Return Code Reason Code Meaning
vm_ipc_success vm_ipc_success QueueDelete completed successfully
vm_ipc_error vm_ipc_bad_export_level Unrecognized export_level
vm_ipc_error vm_ipc_bad_name_len Invalid queue_name_length
vm_ipc_warning vm_ipc_msgs_discarded Messages were discarded
vm_ipc_error vm_ipc_no_such_queue Queue does not exist
vm_ipc_error vm_ipc_not_authorized Not authorized for operation
vm_ipc_error vm_ipc_primary_queue Cannot delete primary queue

Programming Language Bindings

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