86 lines
5.0 KiB
HTML
86 lines
5.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="concept" />
|
||
|
<meta name="DC.Title" content="Summarize data from database file records (grouping)" />
|
||
|
<meta name="abstract" content="The group processing function allows you to summarize data from existing database records." />
|
||
|
<meta name="description" content="The group processing function allows you to summarize data from existing database records." />
|
||
|
<meta name="DC.subject" content="grouping, data from database file records, database file, grouping data from records, example, grouping data from database file records, summarizing data from database file records" />
|
||
|
<meta name="keywords" content="grouping, data from database file records, database file, grouping data from records, example, grouping data from database file records, summarizing data from database file records" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafodynrs.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafogrpex1.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="rbafogrp" />
|
||
|
<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>Summarize data from database file records (grouping)</title>
|
||
|
</head>
|
||
|
<body id="rbafogrp"><a name="rbafogrp"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">Summarize data from database file records (grouping)</h1>
|
||
|
<div><p>The group processing function allows you to summarize data from
|
||
|
existing database records. </p>
|
||
|
<div class="p">You can specify: <ul><li>The grouping fields</li>
|
||
|
<li>Selection values both before and after grouping</li>
|
||
|
<li>A keyed sequence access path over the new records</li>
|
||
|
<li>Mapped field definitions that allow you to do such functions as sum, average,
|
||
|
standard deviation, and variance, as well as counting the records in each
|
||
|
group</li>
|
||
|
<li>The sort sequence and language identifier that supply the weights by which
|
||
|
the field values are grouped</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="p">You normally start by creating a file with a record format containing only
|
||
|
the following types of fields: <ul><li>Grouping fields. Specified on the GRPFLD parameter that define groups.
|
||
|
Each group contains a constant set of values for all grouping fields. The
|
||
|
grouping fields do not need to appear in the record format identified on the
|
||
|
FORMAT parameter.</li>
|
||
|
<li>Aggregate fields. Defined by using the MAPFLD parameter with one or more
|
||
|
of the following built-in functions: <dl><dt class="dlterm">%COUNT</dt>
|
||
|
<dd>Counts the records in a group</dd>
|
||
|
<dt class="dlterm">%SUM</dt>
|
||
|
<dd>A sum of the values of a field over the group</dd>
|
||
|
<dt class="dlterm">%AVG</dt>
|
||
|
<dd>Arithmetic average (mean) of a field, over the group</dd>
|
||
|
<dt class="dlterm">%MAX</dt>
|
||
|
<dd>Maximum value in the group for the field</dd>
|
||
|
<dt class="dlterm">%MIN</dt>
|
||
|
<dd>Minimum value in the group for the field</dd>
|
||
|
<dt class="dlterm">%STDDEV</dt>
|
||
|
<dd>Standard deviation of a field, over the group</dd>
|
||
|
<dt class="dlterm">%VAR</dt>
|
||
|
<dd>Variance of a field, over the group</dd>
|
||
|
</dl>
|
||
|
</li>
|
||
|
<li>Constant fields. Allow constants to be placed in field values. The
|
||
|
restriction that the Open Query File (OPNQRYF) command must know all fields
|
||
|
in the output format is also true for the grouping function.</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<p>When you use group processing, you can only read the file sequentially.</p>
|
||
|
</div>
|
||
|
<div>
|
||
|
<ul class="ullinks">
|
||
|
<li class="ulchildlink"><strong><a href="rbafogrpex1.htm">Example: Summarize data from database file records (grouping)</a></strong><br />
|
||
|
This example shows how to use the group processing functions to summarize data from existing database records.</li>
|
||
|
</ul>
|
||
|
|
||
|
<div class="familylinks">
|
||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafodynrs.htm" title="Dynamic record selection allows you to request a subset of the records in a file without using data description specifications (DDS).">Select records without using DDS</a></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|