ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzalu_5.4.0.1/rzaludataq.htm

151 lines
9.3 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<?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 xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="dc.language" scheme="rfc1766" 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. -->
<meta name="dc.date" scheme="iso8601" content="2005-09-06" />
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
<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))' />
<title>Data queue support</title>
<link rel="stylesheet" type="text/css" href="ibmidwb.css" />
<link rel="stylesheet" type="text/css" href="ic.css" />
</head>
<body>
<a id="Top_Of_Page" name="Top_Of_Page"></a><!-- Java sync-link -->
<script language = "Javascript" src = "../rzahg/synch.js" type="text/javascript"></script>
<a name="rzaludataq"></a>
<h4 id="rzaludataq">Data queue support</h4>
<p>There are two different types of data queue support for spooled files:</p>
<ul>
<li><span class="bold">Data queue support on output queues</span>
<p>Support is
available to optionally associate a data queue with an output queue using
the Create Output Queue (CRTOUTQ) or Change Output Queue (CHGOUTQ) command.
Entries are logged in the data queue when spooled files are in ready (RDY)
status on the output queue. A user program can determine when a spooled file
is available on an output queue using the Receive Data Queue (QRCVDTAQ) API
to receive information from a data queue. See the <a href="../apis/qrcvdtaq.htm">Receive
Data Queue (QRCVDTAQ) API</a> in the Programming topic for more information.</p>
<p>Each time a spooled file on the output queue reaches RDY status an
entry is sent to the data queue. A spooled file can have several changes in
status (for example, ready (RDY) to held (HLD) to release (RLS) to ready (RDY)
again) before it is taken off the output queue. These status changes result
in entries in the data queue for a spooled file each time the spooled file
goes to RDY status.</p>
<p>A spooled file can reach RDY status in these instances: </p>
<ul>
<li>When initially spooled on the output queue.</li>
<li>When the spooled file is opened and the schedule parameter value is *IMMED.</li>
<li>When a job completes and the spooled file schedule parameter value is
*JOBEND.</li>
<li>When the spooled file is released.</li>
<li>When a spooled file is moved to this output queue from another output
queue.</li>
<li>When a writer is ended immediately while printing a spooled file (the
spooled file status is reset from WTR to RDY).</li></ul>
<p>The data queue must be created with a maximum message length (MAXLEN)
parameter value of at least 128 bytes. The sequence (SEQ) parameter value
should be *FIFO or *LIFO. The format of the CRTDTAQ command is:</p>
<pre class="xmp">CRTDTAQ DTAQ (&lt;library name>/&lt;data queue name>) MAXLEN(128) SEQ(*LIFO) </pre>
<p>The Create Output Queue (CRTOUTQ) and Change Output Queue (CHGOUTQ)
commands have a data queue (DTAQ) parameter, which is used to specify the
data name. An error occurs when using these commands if the specified data
queue does not exist or if the user creating or changing the output queue
does not have use authority to the data queue.</p>
<p>After a data queue is
associated with an output queue, any spooled file that is placed on the output
queue in a ready status causes an entry to be placed on the data queue. The
data queue entry is added regardless of the authority the user generating
the spooled file has to the data queue.</p>
<p>The entry in the data queue
has a format of record type 01. See <a href="rzalurectype01.htm#rzalurectype01">Record type 01 data queue entry format</a> for a description
of the information contained in record type 01.</p></li>
<li><span class="bold">Environment variable data queue support</span>
<p>Using
the ADDENVVAR or CHGENVVAR command, you can associate a data queue with a
job or the system. As spooled files are created, the entries are logged in
the data queue. Using the Receive Data Queue (QRCVDTAQ) API to receive information
from the data queue, a user program can determine when a spooled file has
been created by the job or by the system. Use the environment variable data
queue support if you need to determine the identity of a spooled file that
was created by a job (such as a remote command server job) and the spooled
file was stored under a QPRTJOB.</p>
<p>Using the CL command ADDENVVAR, and
specifying a fully qualified data queue name for the environment variable
QIBM_NOTIFY_CRTSPLF, you can associate a data queue with a job or the system.</p>
<p>The command use would be:</p>
<pre class="xmp">ADDENVVAR ENVVAR(QIBM_NOTIFY_CRTSPLF)
VALUE('*DTAQ &lt;library name>/&lt;data queue name>')
LEVEL(*JOB | *sys)</pre>
<p>The data queue must be created with
a record length of at least 144 bytes. The data queue must also have a public
authority of *USE, or you need to grant the QSPL user profile *USE private
authority to the data queue. You must ensure that the containing library has
a public authority of *EXECUTE, or you need to grant the QSPL user profile
*EXECUTE private authority to the library. The format of the CRTDTAQ command
is:</p>
<pre class="xmp">CRTDTAQ DTAQ (&lt;library name>/&lt;data queue name>) MAXLEN(144) AUT(*USE)</pre>
<p>Once a data queue is associated with a job or the system, any
spooled file created by the job or system will automatically have an entry
placed in the data queue. For this action to occur, the user or user profile
QSPL must have authorization to the data queue.</p>
<a name="wq10"></a>
<div class="notetitle" id="wq10">Note:</div>
<div class="notebody">An environment
variable that is specified at the job level takes precedence over the same
environment variable specified at the system level.</div>
<p>The entry in the data queue has a format of record type 02. See <a href="rzalurectype02.htm#rzalurectype02">Record type 02 data queue entry format</a> for
a description of the information contained in record type 02.</p></li></ul>
<p><span class="bold">Error conditions</span></p><blockquote>
<p>An error occurs if the specified data queue does not exist or if the
user creating or changing the output queue does not have use authority to
the data queue.</p>
<p>After a data queue is associated with an output queue,
any spooled file that is placed on the output queue in ready status causes
an entry to be placed on the data queue. The data queue entry is added regardless
of the authority the user generating the spooled file has to the data queue.</p>
<p>If the iSeries server tries to add entries to a data queue that does not
exist or has an invalid length, the system continues with its processing but
sends an informational message to the QSYSOPR message queue. This message
indicates that there is a problem with the data queue and specifies the data
queue name. This message is sent the first time a specific problem occurs
with the data queue of an output queue. The message is sent once every 24
hours.</p>
<p>For example, if message X is received at 10:00 a.m., it is logged
in the QSYSOPR message queue. If message X is received again at 10:30 a.m.,
11:00 a.m., 1:00 p.m., or 1:30 p.m., it will not be logged. As you can see,
the message will not be logged until after 10:00 a.m. the next day, even if
it continues to be received all day.</p>
<p>If after message X is logged at
10:00 a.m., message Y is received at 2:00 p.m., message Y is logged. If message
X is received again at 2:30 p.m., message X will be logged again even though
it was logged earlier in the day.</p>
<p>The intent is not to log the same
recurring message all day, but to inform the user of each change of error
messages associated with the data queue of a particular output queue.</p></blockquote>
<p><span class="bold">Additional considerations</span></p><blockquote>
<p>Changing the data queue of an output queue is allowed regardless of
whether there are spooled files on the output queue. For data queue entries
of record type 01, only spooled files that reach RDY status after the change
will have entries on the data queue. Spooled files already having a status
of ready on the output queue will not have entries on the new data queue.</p>
<p>It is the user's responsibility to manage the data queues. These responsibilities
include creating, clearing, and deleting data queues.</p>
<p>When clearing
all output queues during IPL, any associated data queues are not cleared.
If a damaged system output queue is found, it is re-created without any associated
data queue name. Damaged data queues are not re-created.</p></blockquote>
<a id="Bot_Of_Page" name="Bot_Of_Page"></a>
</body>
</html>