Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.
On CRTDTAQ there is a SIZE() parameter. The defaults are reasonablly large, especially if you're removing them as you process, but maybe it was set to a small value? You may also want to loook at AUTORCL(); if this is set to *NO, the queue will fill up, forcing you to do a Clear Data Queue (QCLRDTAQ) API to get the space back.
You can use Retrieve Data Queue De!--script--ion (QMHQRDQD) API to see what the current settings are. It's fairly straightforward, as APIs go.
Finally, if you want to change the attributes, there is Change Data Queue (QMHQCDQ) API. This will allow you to change the automatic reclaim, and also how locks are enforced (which has nothing to do with size), but that's it. If you want to change anything else, you need to delete the queue and create it again.
Data queues were suplemented with Independent Indexes decades ago. If the DTAQ is indexed, it is really a "User Index" under the covers, but the DTAQ APIs interface with it. I believe Indexes can be virtually any size, perhaps as big as 2TB entries and 10TB in total object size. So I don't think size is the issue for you.
Check the Data Queue attributes (use my free DSPDTAQD command) or perhaps you already have something to do that?
Here's a link to the DSPDTAQD command. http://www.midrangenews.com/view?id=1673&p=10
The above link is to the article I wrote about the DSPDTAQD command, but I just saved it and posted a link to a SAVF of the command so you can just restore and go. Note the SAVLIB(COZTEST) parameter was specified when saved. But you can restore it, obviously, to any library you want.
Here's the link to download the SAVF to your PC. Download DSPDTAQD Command
Dale. CRTDTAQ only has an Entry Size parameter (MAXLEN) that is used for the entry width, not number of entries.
Also, Perhaps you are using the QMHRDQM API instead of QRCVDTAQ??? The former does NOT remove the entries from the DTAQ, while the later does.
What release are you looking at, Bob? CRTDTAQ SIZE() keyword is either a number of elements, or a size as *MAX16MB or *MAX2GB, then a 2nd element with initial number of entries. When you use the storage size, it calculates number of entries based on MAXLEN(). This is the same in 5.4, 6.1, and 7.1.
In any case, QMHRQDM vs. QRCVDTAQ seems a likely cause of the problem.
Ok. I see it now, F10 did not show it; had to press F9 on the prompter. Thanks.