Retrieve Data Queue Info
Data Queues (DTAQ) has been very useful for communication between different Jobs on IBM i.
Sometimes it becomes essentials to see what are the parameters Data Queue is created with. Retrieve Data Queue Description (QMHQRDQD) API has been very much useful to retrieve this information.
We can now retrieve this information directly from SQL with a Query from file 'DATA_QUEUE_INFO' (System Name: DTAQ_INFO). This function is to retrieve the Data Queue attribute and not the data in Data Queue. Have a look at Retrieve data from Data Queue from SQL if you are interested in retrieving data from Data Queue.
This makes it easier to retrieve the data queue attributes and this is like running SELECT query on a table.
This would help us with most of the common questions around Data Queue attributes like,
- How many messages are there in the Data Queue? use column CURRENT_MESSAGES.
- Is the Data Queue is Keyed or What is the Sequence? use column SEQUENCE.
- What is the length of Key data? use column KEY_LENGTH.
These are the few queries I had to check usually and have a look at the fields present in DTAQ_INFO for the full list of fields present..
Let's have a look at the sample query.
- One row would be returned for each Data Queue.
- User should have sufficient authority for the Data Queue.
If you have any Suggestions or Feedback, Please leave a comment below or use Contact Form.
Comments
Post a Comment