Advantages of Data Queues
Data queues provide a fast means of inter-process communication, requiring low system overhead and minimal setup. AS/400 Data Queues are designed to provide a flexible, highly efficient, yet temporary means of inter-process communication. Data queues are familiar to most AS/400 programmers as a simple method of passing information to another program.
Data queues provide considerable flexibility to the application programmer. The data queues interfaces require no communications programming and can be used either for connected or disconnected communication. AS/400 and PC applications can be developed using any supported language, yet still communicate with each other. PC programs can communicate with AS/400 programs through a common AS/400 data queue. The use of data queues requires little knowledge of communication and no knowledge of APPC if the programmer utilizes the Microsoft® Data Queue ActiveX® control. The data queue messages are merely described at the record level, allowing the application programmer to define the field-level structure as required.
By default, when one program reads an entry in the queue, the entry is then deleted. Pointers to the queue entries are then updated to reflect the change in the record stack. A data queue can exist with no entries, a single entry, or multiple entries. Multiple concurrent jobs and programs can access data queues.
When receiving data, the requesting application can set a time-out value to wait for data to arrive in the queue. Waits can be applied based on entry of the data record or for a time period (zero seconds to many days in length). A program that reads from a queue need not be running when the queue is created or when records are inserted. A single data queue can support many separate interactive jobs. At regular intervals or at the end of the day, records in the data queue can be persisted to a file by a single automated batch process.
See Alsohttp://go.microsoft.com/fwlink/?linkid=29507. Copyright © 2004 Microsoft Corporation.
All rights reserved.