dataq - Send or receive messages from i5/OS(TM) data queue

Synopsis

dataq -c [-l] queue

dataq -r [-lp] [-n number] [-t seconds] queue

dataq -w [-l] [-n number] queue [ data ... ]

Description

The dataq utility clears messages from a data queue, reads messages from a data queue, or writes messages to a data queue.

In the first synopsis form, dataq clears all of the messages from the queue.

In the second synopsis form, dataq reads messages from the queue and writes them to standard output. By default, it reads one message from the queue. If no messages are available from the queue, dataq waits for a message.

In the third synopsis form, dataq writes messages to the queue. If data is specified, it is written as one message to the queue. Otherwise, each line read from standard input is written as a message to the queue.

Options

-c
Clear all of the messages from the queue.
-l
When a relative path name is specified, use the library list to find the queue.
-n number
If the -r option is specified, read number messages from the queue. If the -w option is specified, write number messages to the queue.
-p
Peek mode. When reading messages, the messages are left on the queue.
-r
Read messages from the queue.
-t seconds
When reading messages, exit if no messages have been received after seconds seconds of waiting.
-w
Write messages from the queue.

Operands

The queue is the path name to a data queue. A data queue can only exist in the QSYS.LIB file system.

Exit Status

Related information