<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html lang="en-us" xml:lang="en-us"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="security" content="public" /> <meta name="Robots" content="index,follow" /> <meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' /> <meta name="DC.Type" content="concept" /> <meta name="DC.Title" content="Typical use of data queues" /> <meta name="abstract" content="A data queue is a powerful program-to-program interface. Programmers who are familiar with programming on the iSeries servers are accustomed to using queues. Data queues simply represent a method that is used to pass information to another program." /> <meta name="description" content="A data queue is a powerful program-to-program interface. Programmers who are familiar with programming on the iSeries servers are accustomed to using queues. Data queues simply represent a method that is used to pass information to another program." /> <meta name="DC.Relation" scheme="URI" content="rzaikappdq.htm" /> <meta name="copyright" content="(C) Copyright IBM Corporation 1999, 2006" /> <meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1999, 2006" /> <meta name="DC.Format" content="XHTML" /> <meta name="DC.Identifier" content="dqapitypuse" /> <meta name="DC.Language" content="en-us" /> <!-- All rights reserved. Licensed Materials Property of IBM --> <!-- US Government Users Restricted Rights --> <!-- Use, duplication or disclosure restricted by --> <!-- GSA ADP Schedule Contract with IBM Corp. --> <link rel="stylesheet" type="text/css" href="./ibmdita.css" /> <link rel="stylesheet" type="text/css" href="./ic.css" /> <title>Typical use of data queues</title> </head> <body id="dqapitypuse"><a name="dqapitypuse"><!-- --></a> <!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script> <h1 class="topictitle1">Typical use of data queues</h1> <div><p>A data queue is a powerful program-to-program interface. Programmers who are familiar with programming on the iSeries™ servers are accustomed to using queues. Data queues simply represent a method that is used to pass information to another program.</p> <p>Because this interface does not require communications programming, use it either for synchronous or for asynchronous (disconnected) processing.</p> <p>Develop host applications and PC applications by using any supported language. For example, a host application could use RPG while a PC application might use C++. The queue is there to obtain input from one side and to pass input to the other.</p> <p>The following example shows how data queues might be used: </p> <ul><li>A PC user might take telephone orders all day, and key each order into a program, while the program places each request on iSeries data queue.</li> <li>A partner program (either a PC program or an iSeries program) monitors the data queue and pulls information from queue. This partner program could be simultaneously running, or started after peak user hours.</li> <li>It may or may not return input to the initiating PC program, or it may place something on the queue for another PC or iSeries program.</li> <li>Eventually the order is filled, the customer is billed, the inventory records are updated, and information is placed on the queue for the PC application to direct a PC user to call the customer with an expected ship date.</li> </ul> <div class="section"><h4 class="sectiontitle">Objects</h4><p>An application that uses the data queue function uses four <strong>objects</strong>. Each of these objects is identified to the application through a handle. The objects are: </p> <dl><dt class="dlterm">Queue object:</dt> <dd>This object represents the iSeries data queue.</dd> <dt class="dlterm">Attribute:</dt> <dd>This object describes the iSeries data queue.</dd> <dt class="dlterm">Data:</dt> <dd>Use these objects to write records to, and to read records from, the iSeries data queue.</dd> <dt class="dlterm">Read object:</dt> <dd>Use this object only with the asynchronous read APIs. It uniquely identifies a request to read a record from the iSeries data queue. This handle is used on subsequent calls to check if the data has been returned. See the <a href="rzaikcwbdqasyncread.htm#cwbdq_asyncread">cwbDQ_AsyncRead</a> API for more information.</dd> </dl> </div> </div> <div> <div class="familylinks"> <div class="parentlink"><strong>Parent topic:</strong> <a href="rzaikappdq.htm" title="Use iSeries Access for Windows Data Queues application programming interfaces (APIs) to provide easy access to iSeries data queues. Data queues allow you to create client/server applications that do not require the use of communications APIs.">iSeries Access for Windows Data Queues APIs</a></div> </div> </div> </body> </html>