RTVDTAQ RETRIEVE DATA QUEUE TAADTQQ |
The Retrieve Data Queue command retrieves the first entry in a data
queue. Return values include the arrival date/time, sender ID, the
data, and the key. RTVDTAQ allows you to check if any processing
should occur based on the arrival date and time of the first entry.
The entry is not removed from the data queue. TAA9896 is sent as an
escape message if no entries exist.
Both keyed and non-keyed data queues are supported.
A typical series of commands would be:
DCL &ARRDATE *CHAR LEN(7)
DCL &ARRTIME *CHAR LEN(6)
DCL &DATA *CHAR LEN(5000)
.
RTVDTAQ DTAQ(xxx) ARRDATE(&ARRDATE)
ARRTIME(&ARRTIME) DATA(&DATA)
MONMSG MSGID(TAA9896) EXEC(DO) /* No entry */
/* */
/* Your processing of no entry */
/* */
ENDDO /* No entry */
The first entry from the data queue would be retrieved. The entry
would not be removed.
RTVDTAQ escape messages you can monitor for
-------------------------------------------
TAA9896 No entries exist
Escape messages from based on functions will be re-sent.
Command parameters *CMD
------------------
DTAQ The qualified name of the data queue to retrieve
from. The library value defaults to *LIBL. *CURLIB
or a specific library may also be used.
ARRDATE The arrival date of the first entry in CYMD format.
This is an optional return parameter that if used
must be specified as *CHAR LEN(7).
ARRTIME The arrival time of the first entry in HHMMSS
format. This is an optional return parameter that
if used must be specified as *CHAR LEN(6).
SENDERID The sender ID of the first entry. This value will
be blank if the data queue was created with
SENDERID(*NO). This is an optional return parameter
that if used must be specified as *CHAR LEN(36).
DATA The entry data of the first entry. The first 5000
bytes of the entry will be returned. This is an
optional return parameter that if used must be
specified as *CHAR LEN(5000).
KEY The key of the first entry. This value will be
blank unless the data queue was created with
SEQ(*KEYED). This is an optional return parameter
that if used must be specified as *CHAR LEN(256).
Restrictions
------------
Because the command returns values, RTVDTAQ may only be used in a CL
program.
Prerequisites
-------------
The following TAA Tools must be on your system:
CHKOBJ3 Check object 3
CVTDTS Convert DTS
RSNLSTMSG Resend last message
RTVDTAQD Retrieve data queue description
SNDESCINF Send escape information
SNDESCMSG Send escape message
Implementation
--------------
None, the tool is ready to use.
Objects used by the tool
------------------------
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
RTVDTAQ *CMD TAADTQQ QATTCMD
TAADTQQC *PGM CLP TAADTQQC QATTCL
TAADTQQR *PGM RPGLE TAADTQQR QATTRPG
|
Added to TAA Productivity tools January 1, 2007