89 lines
3.4 KiB
HTML
89 lines
3.4 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
|
|
<title>Using Data Queue APIs</title>
|
|
<!-- 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. -->
|
|
<!-- Change History: -->
|
|
<!-- YYMMDD USERID Change description -->
|
|
<!-- End Header Records -->
|
|
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
|
</head>
|
|
<body>
|
|
<!-- Java sync-link -->
|
|
<script type="text/javascript" language="Javascript" src="../rzahg/synch.js">
|
|
</script>
|
|
|
|
<h2>Using Data Queue APIs</h2>
|
|
|
|
<p> The advantages of using data queues are:</p>
|
|
|
|
<ul>
|
|
<li>Using data queues frees a job from performing some work. If the job is an
|
|
interactive job, the data queue APIs can provide better response time and
|
|
decrease the size of the interactive program and its process activation group
|
|
(PAG). This, in turn, can help overall system performance. For example, if
|
|
several work station users enter a transaction that involves updating and
|
|
adding to several files, the system can perform better if the interactive jobs
|
|
submit the request for the transaction to a single batch processing job.<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li>Data queues are a fast means of asynchronous communication between two
|
|
jobs. Using a data queue to send and receive data requires less system resource
|
|
than using database files, message queues, or data areas to send and receive
|
|
data.<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li>You can send to, receive from, and retrieve a description of a data queue
|
|
in any HLL program. This is done by calling the Send to a Data Queue
|
|
(QSNDDTAQ), Receive from Data Queue (QRCVDTAQ), Retrieve Data Queue Message
|
|
(QMHRDQM), Clear Data Queue (QCLRDTAQ), and Retrieve Data Queue Description
|
|
(QMHQRDQD) APIs.<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li>When receiving data from a data queue, you can set a time-out such that the
|
|
job waits until an entry arrives on the data queue. This is different from
|
|
using the EOFDLY parameter on the Override Database File (OVRDBF) command,
|
|
which causes the job to be activated whenever the delay time ends.<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li>More than one job can receive data from the same data queue. This is an
|
|
advantage in certain applications where the number of entries to be processed
|
|
is greater than one job can handle within the desired performance restraints.
|
|
For example, if several printers are available to print orders, several
|
|
interactive jobs could send requests to a single data queue. A separate job for
|
|
each printer could receive data from the data queue in first-in-first-out
|
|
(FIFO), last-in-first-out (LIFO), or keyed-queue order.<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li>Data queues have the ability to attach a sender ID to each message being
|
|
placed on the queue. The sender ID, an attribute of the data queue which is
|
|
established when the queue is created, contains the qualified job name and
|
|
current user profile.</li>
|
|
</ul>
|
|
|
|
<br>
|
|
|
|
<hr>
|
|
<center>
|
|
<table cellpadding="2" cellspacing="2">
|
|
<tr align="center">
|
|
<td valign="middle" align="center">
|
|
<a href="#Top_Of_Page">Top</a> |
|
|
<a href="obj1.htm">Object APIs</a> |
|
|
<a href="aplist.htm">APIs by category</a></td>
|
|
</tr>
|
|
</table>
|
|
</center>
|
|
</body>
|
|
</html>
|