ibm-information-center/dist/eclipse/plugins/i5OS.ic.ddp_5.4.0.1/rbal1anrwtr.htm

119 lines
8.0 KiB
HTML

<?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="reference" />
<meta name="DC.Title" content="Example: Analyze the RW trace data" />
<meta name="abstract" content="This discussion examines the elements that make up the data stream in the example." />
<meta name="description" content="This discussion examines the elements that make up the data stream in the example." />
<meta name="DC.subject" content="analyzing, RW trace data, trace data, example, analyzing the RW trace data" />
<meta name="keywords" content="analyzing, RW trace data, trace data, example, analyzing the RW trace data" />
<meta name="DC.Relation" scheme="URI" content="rbal1interpretdata.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rbal1anrwtr" />
<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>Example: Analyze the RW trace data </title>
</head>
<body id="rbal1anrwtr"><a name="rbal1anrwtr"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Example: Analyze the RW trace data </h1>
<div><p>This discussion examines the elements that make up the data stream
in the example.</p>
<div class="section"><p>The example in <a href="rbal1interpretdata.htm#rbal1interpretdata__rbal1rwinf">Figure 1</a> shows
the data stream received during a distributed SQL query function. This particular
trace was run at the application requester (AR) end of the connection. Therefore,
the associated program module that produced the data is QRWSQRY.</p>
</div>
<div class="section"><p>For more information about the interpretation of Distributed
Relational Database Architecture™ (DRDA<sup>®</sup>) data streams, see the <cite>Distributed
Relational Database Architecture Reference</cite> and the <cite>Distributed
Data Management Level 4.0 Architecture Reference</cite> books. These documents
are available on the Web at <a href="http://www.opengroup.org/dbiop/index.htm" target="_blank">www.opengroup.org/dbiop/index.htm</a>.</p>
</div>
<div class="section"><p>The trace data follows the colon (:) marking the end of the trace
point identifier. In this example, the first six bytes of the data stream
contain the DDM data stream structure (DSS) header. The first two bytes of
this DSS header are a length field. The third byte, <span>X'D0'</span> is the
registered SNA architecture identifier for all DDM data. The fourth byte is
the format identifier (explained in more detail later). The fifth and sixth
bytes contain the DDM request correlation identifier.</p>
</div>
<div class="section"><p>The next two bytes, <span>X'0010'</span> (decimal 16) give the length
of the next DDM object, which in this case is identified by the <span>X'2205'</span> which
follows it and is the code point for the OPNQRYRM reply message.</p>
</div>
<div class="section"><p>Following the 16-byte reply message is a six-byte DSS header for
the reply objects that follow the reply message. The first reply object is
identified by the <span>X'241A'</span> code point. It is a QRYDSC object. The
second reply object in the example is a QRYDTA structure identified by the <span>X'241B'</span> code
point (split between two lines in the trace output). As with the OPNQRYRM
code point, the preceding two bytes give the length of the object.</p>
</div>
<div class="section"><p>Looking more closely at the QRYDTA object, you can see a <span>X'FF'</span> following
the <span>X'241B'</span> code point. This represents a null SQLCAGRP (the form
of an SQLCA or SQL diagnostic area that flows on the wire). The null form
of the SQLCAGRP indicates that it contains no error or warning information
about the associated data. In this case, the associated data is the row of
data from an SQL SELECT operation. It follows the null SQLCAGRP. Because rows
of data as well as SQLCAGRPs are nullable, however, the first byte that follows
the null SQLCAGRP is an indicator containing <span>X'00'</span> that indicates
that the row of data is not null. The meaning of the null indicator byte is
determined by the first bit. A 1 in this position indicates null. However,
all 8 bits are usually set on when an indicator represents a null object.</p>
</div>
<div class="section"><p>The format of the row of data is indicated by the preceding QRYDSC
object. In this case, the QRYDSC indicates that the row contains a nullable
SMALLINT value, a nullable CHAR(3) value, and a non-nullable double precision
floating point value. The second byte past the null SQLCAGRP is the null indicator
associated with the SMALLINT field. It indicates the field is not null, and
the <span>X'0001'</span> following it is the field data. The nullable CHAR(3)
that follows is present and contains 111. The floating point value that follows
next does not have a <span>X'00'</span> byte following it, since it is defined
to be not nullable.</p>
</div>
<div class="section"><p>A second row of data with a null SQLCAGRP follows the first, which
in turn is followed by another six-byte DSS header. The second half of the
format byte (<span>X'2'</span>) contained in that header indicates that the corresponding
DSS is a REPLY. The format byte of the previous DSS (<span>X'53'</span>) indicated
that it was an OBJECT DSS. The ENDQRYRM reply message carried by the third
DSS requires that it be contained in a REPLY DSS. The ENDQRYRM code point
is <span>X'220B'</span>. This reply message contains a severity code of <span>X'0004'</span>,
and the name of the RDB that returned the query data ('DB2ESYS').</p>
</div>
<div class="section"><p>Following the third DSS in this example is a fourth and final
one. The format byte of it is <span>X'03'</span>. The 3 indicates that it is an
OBJECT DSS, and the 0 that precedes it indicates that it is the last DSS of
the chain (the chaining bits are turned off).</p>
</div>
<div class="section"><p>The object in this DSS is an SQLCARD containing a non-null SQLCAGRP.
The first byte following the <span>X'2408'</span> SQLCARD code point is the indicator
telling us that the SQLCAGRP is not null. The next four bytes, <span>X'00000064'</span>,
represents the +100 SQLCODE which means that the query was ended by the encounter
of a 'row not found' condition. The rest of the fields correspond to other
fields in an SQLCA. The rest of the fields correspond to other fields in an
SQLCA or SQL diagnostic area. The mapping of SQLCAGRP fields to SQLCA and
SQL diagnostic area fields can be found in the <cite>Distributed
Relational Database Architecture Reference</cite> book. This document
is available at the Open Group Web site <img src="www.gif" alt="Link outside information center" /><a href="http://www.opengroup.org/dbiop/index.htm" target="_blank">(www.opengroup.org/dbiop/index.htm)</a></p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbal1interpretdata.htm" title="The RW component of the i5/OS licensed program includes most of the Distributed Relational Database Architecture (DRDA) support.">Interpret data entries for the RW component of trace job</a></div>
</div>
</div>
</body>
</html>