CRTDTAQ(Create Data Queue), DLTDTAQ(Delete data queue) Commands, LIFO, FIFO and KEYED access sequences of AS400 Data Queue
Posted on 10. May, 2009 by Niraj
Data queue can be divided into three types based on how they allow you to retrieve individual records. They are
- LIFO Type Data Queue :- In such type of data queues, the last entry to data queue is the first one which is sent out of the queue. Consider this example to be similar to books stacked up in a cubicle box. The last book entering the box is the once which is removed first.
- FIFO :- The first entry of the data queue is picked up for processing first. This type of queue is very common. Most of human queues are this type of queues e.g. people in queue to buy cinema queue etc.
- Keyed :- Keyed data queue can be accessed by a specific key value, irrespective of the position of the entry in the data queue. Example of such data queue will be books stacked on stand in a library. One can access any book as he/she wishes.
Standard AS400 Data Queue Commands:-
- CRTDTAQ :- AS400 Command CRTDTAQ 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.
Important arguments of this command are
- Name – This is the name of the data queue. It’s required parameter.
- Library – Default is user’s current library.
- Type – Default is standard (*STD). Created on local system.
- 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.
- Queue Size – Max 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: - crtdtaq Library/DataQueue length
For further reading, refer http://publib.boulder.ibm.com/iseries/v5r2/ic2924/info/cl/crtdtaq.htm
- DLTDTAQ – This command allows you to delete a data queue from a specific a specific library/ies. The arguments are self explanatory.
Example:- dltdtaq Library/DataQueueIn the next section we’ll learn how to perform different operation on an AS400 data queues.
- 4799 reads
