× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Actually, each entry of an i5/OS queue object (with object type hex 0A)
always occupies a fixed length of storage. As to a *DTAQ object, the
length is determined by the MAXLEN parameter when one creates a *DTAQ using
CL command CRTDTAQ. Realizing this fact is import to ones who want to put
variable formats of data on a queue object with large queue entry length.
In this case, a large amount of storage will be wasted if there're many
numbers of queue entries left undequeued on the queue object.

To confirm the fact metioned above, one can do a simple experiment on a
*DTAQ object.
1. Create a FIFO *DTAQ with entry length 65412, and with initial storage
allocated to hold only 1 entry.
CRTDTAQ DTAQ(Q16) MAXLEN(64512) SIZE(*MAX16MB 1) AUTORCL(*YES)
2. Check the size of the *DTAQ object, e.g.
DSPOBJD OBJ(Q16) OBJTYPE(*DTAQ) DETAIL(*FULL)
3. Enqueue the *DTAQ and then check the size of the *DTAQ respectively when
there're 1, 2, 65, and 66 entries on the *DTAQ.

Entries Obj Size in Bytes What's happening
0 69632 Initial size of *DTAQ
1 69632 The initial allocated storage for 1
entry is used.
2 4206592 Storage used by *DTAQ is extended to
hold next 64 entries
65 4206592
66 8339456 Storage used by *DTAQ is extended to
hold next 64 entries

To enqueue a *DTAQ for a given number of times conveniently, making use of
QShell commands might be considered, e.g.
n=1; while [ $n -le 64 ] ; do system "CALL PGM(QSNDDTAQ) PARM('Q16' '*LIBL'
X'00007F' 'Hello:p')"; n=$((n+1)); done

There's an article that discussed about i5/OS queue objects in details:
http://i5toolkit.sourceforge.net/art/page_using_q_en.html

HTH.

Regards!



date: Wed, 25 Nov 2009 12:01:15 -0500
from: Michael Ryan <michaelrtr@xxxxxxxxx>
subject: Re: Can a data queue have varying length entries?

Yes it can, and the received message size parameter tells you the length.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.