/*
** +----------------------------------------------------------------------------+
** | CREATE QUEUE |
** | -------------------------------------------------------------------------- |
** | -> (QUEUE_NAME) - Name of the queue to create and place in the |
** | queue table (below). |
** | -> (QUEUE_TABLE) - Name of the queue table to store queue the (above) |
** | named queue in. |
** | -> (QUEUE_TYPE) - Type of queue to create. The types of queues to |
** | are NORMAL queues and EXCEPTION queues. |
** | -> (MAX_RETRIES) - Used to limit the number of times a dequeue with the |
** | REMOVE mode can be attempted on the message. The |
** | default is 0 which allows no retries. When the |
** | maximum number of retries is reached, the message is |
** | moved to the exception queue. The value is |
** | incremented when the application issues a rollback |
** | after executing the dequeue. |
** | -> (RETRY_DELAY) - Specifies the delay time, in seconds, before the |
** | message is scheduled for processing again after an |
** | application rollback. The default value is 0, which |
** | allows a message to be retried as soon as possible. |
** | If MAX_RETRIES is set to 0, the RETRY_DELAY argument |
** | will have no effect. |
** | -> (RETENTION_TIME) - |
** | -> (DEPENDENCY_TRACKING) - |
** | -> (COMMENT) - Assign a comment to the queue. |
** | -> (AUTO_COMMIT) - If you set the AUTO_COMMIT argument to 'TRUE', the |
** | current transaction, if any, will be committed |
** | before the operation is carried out. This is the |
** | default action. If you set the AUTO_COMMIT argument |
** | to 'FALSE', the operation will be part of the |
** | current transaction and will become persistent only |
** | when the user issues a COMMIT. |
** +----------------------------------------------------------------------------+
*/

BEGIN
/*
** +----------------------------------------------------------------------------------+
** | DEQUEUE OPTIONS |
** | -------------------------------------------------------------------------------- |
** | -> (CONSUMER_NAME) - Name of the application, process or user receiving the |
** | message. Should be NULL for queues not set up to handle |
** | more than one consumer. |
** | -> (DEQUEUE_MODE) - Specifies locks, if any, to be acquired on the message by |
** | the dequeue() process. Can be: |
** | |
** | BROWSE : For "read-only" access similar to that used in |
** | "select" statements. |
** | LOCKED : For the ability to write to the message during |
** | the transaction, similar to a share lock |
** | acquired in a "select for update" statement. |
** | REMOVE : For the ability to read the message, |
** | updating it or deleting it. The message is |
** | retained according to properties set in queue |
** | table creation. |
** | |
** | -> (NAVIGATION) - Determines the position of the message to be retrieved, |
** | the first step in retrieving messages. The second step is |
** | applying search criteria. The navigation variable can have |
** | one of three values: |
** | |
** | NEXT_MESSAGE : Is used for retrieving the next |
** | message available that matches search |
** | criteria. |
** | NEXT_TRANSACTION : Is used to skip remaining messages in |
** | the current transaction group and |
** | retrieve the first message of the |
** | next transaction group. |
** | FIRST_MESSAGE : Used to retrieve the first message |
** | that fits the search criteria, |
** | resetting the position to the |
** | beginning of queue. |
** | -> (VISIBILITY) - Defines visibility of the message within the transaction |
** | of the application dequeueing it. Values are: |
** | |
** | ON_COMMIT : If the message dequeued is part of |
** | the current transaction. |
** | IMMEDIATE : If the message is its own transaction.|
** | |
** | -> (WAIT) - Specifies how long to wait if an attempt is made to |
** | enqueue() a message and there is no message to retrieve. |
** | Values are: |
** | |
** | FOREVER : Wait forever. |
** | NO_WAIT : Do not wait for any message. |
** | num : Number that represents the number of |
** | seconds it will wait. |
** | |
** | -> (MSGID) - The message identifier for the message to be dequeued. If |
** | specified, the message will be dequeued even if expired. |
** | -> (CORRELATION) - The name of the message to be dequeued. |
** | |
** +----------------------------------------------------------------------------------+
*/