The RXS function queuevar('queue_name','queue_element') returns '1' if queue_element does exist in the queue queue_name, otherwise '0' is returned.
If the queue queue_name does not exist, then '0' is returned.
Example 14.1:
)action out='q1'
9
121
25
2
)endaction
)action out='q2'
7
13
25
9
)endaction
)action in='q1'
if queuevar('q2', word.1) = 1 then do
word.1
end
)endaction
Output is
9
25
That is: elements existing in both queues.