Data Queue
Data Queue
There are three ways to designate the order of messages on a data queue:
LIFO
o
FIFO
Last in, first out. The last message (newest) placed on the data queue
will be the first message taken off of the queue.
First in, first out. The first message (oldest) placed on the data queue
will be the first message taken off of the queue.
KEYED
o
Each message on the data queue has a key associated with it. A
message can be taken off of the queue only by requesting the key with
which it is associated.
DLTDTAQ
o
QRCVDTAQ
o
QCLRDTAQ
o
CRTDTAQ Command allows you to create a data queue object. A data queue is
identified on AS400 system by its type *DTAQ. This command allows you to
create both local as well DDM data queue. Some of the command parameters
are ...
Name This is the name of the data queue. Its required parameter.
Library Default is users current library.
Type Default is standard (*STD). Created on local system. A DDM data queue is
the same as a DDM file. It is a logical view of a data queue on another
machine. A DDM data queue points to the *STD data queue on the other
machine.
Max Length This is the maximum length of each entry. We generally keep it
sufficient enough to accommodate any future changes.
Auxiliary Storage Default is *NO. This means any changes to data queue are
not immediately written to the backup storage. *YES means changes are
immediately written to the backup storage.
Access Sequence This is what we discussed earlier. Default is the most
commonly used access sequence i.e *FIFO. Other valid values are *LIFO and
*KEYED. If you select *KEYED, you are then prompted for the key length. Just
as with a database file, the key length is the length of the data you are going
to use as the key to the data queue.
Size This value restricts the maximum storage which can be allocated to a data
queue. This can be a number like 100, *MAX16MB or *MAX2GB. With *max
options, the system calculates how many max entries should be allowed.
Example:
?
1 DLTDTAQ DTAQ(MYLIB/@MYDATAQ)
The Send Data Queue (QSNDDTAQ) API sends data to the specified data
queue.
?
1
2
3
4
5
call
parm
parm
parm
parm
'QSNDDTAQ'
'@MYDATAQ'
dtaq_name
'*LIBL'
dtaq_lib
256
dtaq_len
dtaq_data
The Receive Data Queue (QRCVDTAQ) API receives data from the specified
data queue.
When more than one program has a receive pending on a data queue at one time, a
data entry sent to the data queue is received by only one of the programs. The program
with the highest run priority receives the entry. The next entry sent to the queue is
given to the job with the next highest priority.
?
1
2
3
4
5
6
call
parm
parm
parm
parm
Parm
'QRCVDTAQ'
'@MYDATAQ'
@DQ_NAME
'*LIBL'
@DQ_Libr
@DQ_Length
@DQ_Data
-1
@Wait_Sec
9 comments :
1.
ReplyDelete
2.
telephone apps
ReplyDelete
4.
ReplyDelete
5.
ReplyDelete
6.
7.
ReplyDelete
8.
ReplyDelete
9.
jQuery AJAX request and response example - Java Servlets, MySQL and JSON
Android ListView dynamically Load more items when scroll to the Bottom
Java SFTP Apache commons file download, upload and delete example
If the request to the Web service is a simple JSON object, then you can convert the
HTTP response
Java SFTP Apache commons file download, upload and delete example
Secure File Transfer Protocol or SFTP uses the SSH secure shell protocol to provides
file access, file transfer, and file
Privacy Policy
Comments Policy
http://publib.boulder.ibm.com/iserie...2924/index.htm