.ig >>
<STYLE TYPE="text/css">
<!--
        A:link{text-decoration:none}
        A:visited{text-decoration:none}
        A:active{text-decoration:none}
        OL,UL,P,BODY,TD,TR,TH,FORM { font-family: arial,helvetica,sans-serif;; font-size:small; color: #333333; }

        H1 { font-size: x-large; font-family: arial,helvetica,sans-serif; }
        H2 { font-size: large; font-family: arial,helvetica,sans-serif; }
        H3 { font-size: medium; font-family: arial,helvetica,sans-serif; }
        H4 { font-size: small; font-family: arial,helvetica,sans-serif; }
-->
</STYLE>
<title>ploticus: proc processdata</title>
<body bgcolor=D0D0EE vlink=0000FF>
<br>
<br>
<center>
<table cellpadding=2 bgcolor=FFFFFF width=550><tr>
<td>
  <table cellpadding=2 width=550><tr>
  <td><br><h2>proc processdata</h2></td>
  <td align=right>
  <small>
  <a href="../doc/welcome.html"><img src="../doc/ploticus.gif" border=0></a><br>
  Version 2.40 Jan'08
     </small><br><a href="../doc/scripthome.html">Scripts</a>
  <td></tr></table>
</td></tr>
<td>
<br>
<br>
.>>

.TH proc_processdata PL "15-JAN-2008   PL ploticus.sourceforge.net"

.LP
\fBproc processdata\fR performs various types of manipulations on the
.ig >>
<a href="dataformat.html#currentds">
.>>
\0current data set.
.ig >>
</a>
.>>
Here are some of the things this proc can do: 
.IP \0
- accumulation (horizontal and vertical)
.IP \0
- break processing
.IP \0
- count/summate on instances, numeric bins, or time-based bins
.IP \0
- joins 
.IP \0
- row numbering
.IP \0
- compute percents
.IP \0
- reverse row order
.IP \0
- rotation of row/column matrix
.IP \0
- find mean, sd, min, max
.IP \0
- compute totals
.LP
The \fCaction\fR attribute controls the type of processing to be done.
The result is usually a new in-memory data set that subsequent plotting procs work from, 
but sometimes the result is simply the setting of some variables, as with \fCaction: totals\fR,
and it is also possible to write the result to a file (see outfile).
.LP
When a new data set is created, it will be kept in memory along with the original data by default.
To discard the new data set and return to the original one, use 
.ig >>
<a href="usedata.html">
.>>
\0proc usedata.
.ig >>
</a>
.>>
.LP
Some of the actions assign default field names to the result data set as noted, others do not
(result names can always be overridden by specifying \fCfieldnames\fR).
Use \fCshowresults\fR to verify that any field names associated with result data set are as expected.
.LP
For additional data processing capabilities see also
.ig >>
<a href="getdata.html">
.>>
\0proc getdata
.ig >>
</a>
.>>
\fCfilter\fR
and 
.ig >>
<a href="tabulate.html">
.>>
\0proc tabulate.
.ig >>
</a>
.>>

.ig >>
<br><br><br>
.>>

.SH Example
A gallery example that demonstrates and tests all the available actions is
.ig >>
<a href="../gallery/processdata.htm">
.>>
\0processdata
.ig >>
</a>
.>>

.ig >>
<br><br><br>
.>>

.SH Variables that are set by processdata
.LP
\fBNRECORDS\fR = Number of rows in the data result.
.LP
\fBNFIELDS\fR = Number of fields per row in the data result.
.LP
\fBTOTALS\fR = If totals, percents, or accumulation are being done, this variable is set to the column (field) total(s).  See 
\fCaction: totals\fR for more info.
.LP
\fCaction: stats\fR and \fCaction: breaks\fR set additional variables, described in the \fCstats\fR section below.


.ig >>
<br><br><br>
.>>

.SH Actions
The \fCaction\fR attribute controls the type of operation that will be done.
Often the \fCfields\fR attribute is used to indicate which field(s) are involved.  
If \fCaction\fR is not specified, it defaults to \fCecho\fR.

.ig >>
<br><br>
.>>

.IP \0
\fBaction: accumulate\fR  
.ig >>
&nbsp; &nbsp;
.>>
Rewrite field(s) as cumulative series (downward accumulation); all other fields are passed through transparently.
The field(s) to operate on must be given in the \fCfields\fR attribute.
The TOTALS variable is also set to the column (field) total, in case it's useful.
For example, the data set on the left would be transformed to the one 
on the right (\fCfields: 2\fR):
.nf
	A21 3			A21 3
	A22 5		-->	A22 8 
	A23 2			A23 10
	A24 1			A24 11
.fi
.ig >>
<br><br>
.>>

.IP \0
\fBaction: breaks\fR 
.ig >>
&nbsp; &nbsp;
.>>
performs break processing, which is
useful for stepping through a sorted data set one chunk at a time and producing a plot for each chunk.
Input data \fBmust\fR be ordered on (or at least clustered on) the break fields.
Specify \fCfields\fR as one or more (max 5) identifying "break" fields.
The \fCcomplen\fR attribute (see below) can be used to control the number of characters examined in comparisons.
Processing involves examining data rows one at a time, and when a difference in any of the break fields is detected
processing stops.  Generally used within a loop. 
.ig >>
<a href="#breaks">
.>>
\0See further discussion below
.ig >>
</a>
.>>

.ig >>
<br><br><br>
.>>

.IP \0
\fBaction: breakreset\fR  
.ig >>
&nbsp; &nbsp;
.>>
Reset the "current row" to the beginning of the data set,
for the occasional time when more than one pass through a data set will be done
using \fCaction: breaks\fR .
This is automatically done if a new data set is read by proc getdata.



.ig >>
<br><br><br>
.>>
           
.IP \0
\fBaction: count\fR  
.ig >>
&nbsp; &nbsp;
.>>
Count instances or perform summations by instance.
An "instance" can be a literal string, a substring (specify \fCcomplen\fR), 
or a numeric or chronological range (specify \fCbinsize\fR and perhaps \fCbinmod\fR).
\fBInput data must be sorted\fR (or at least grouped) on the key field.
Resulting data set will always have two fields.
One or two \fCfields\fR must be specified using the \fCfields\fR attribute.  
If one field is specified, the result fields will be named \fCbin\fR and \fCcount\fR,
for example (\fCfields: 1\fR):
.nf
	062698	 		062698 2
	062698 		  -->	062898 1
	062898 			070198 3
	070198 			070498 1
	070198	 
	070198
	070498 
.fi
.IP \0
If two \fCfields\fR are specified, the result fields will be named \fCbin\fR and \fCsum\fR,
for example (\fCfields: 1 2\fR):
.nf
	062698 4		062698 10
	062698 6	  -->	062898 3
	062898 3		070198 9
	070198 2		070498 2
	070198 4
	070198 3
	070498 2
.fi
See also \fCaction: segment\fR and \fCaction: segmentb\fR described below, which are
similar.
A gallery example that uses \fCaction: count\fR is
.ig >>
<a href="../gallery/hitcount.htm">
.>>
\0hitcount
.ig >>
</a>
.>>

.ig >>
<br><br><br>
.>>
.IP \0
\fBaction: echo\fR
.ig >>
&nbsp; &nbsp;
.>>
Pass data rows transparently to the new data set, except for any effect of \fCselect\fR, \fCkeepfields\fR, or \fCrejectfields\fR.

.ig >>
<br><br><br>
.>>

.IP \0
\fBaction: join\fR
.ig >>
&nbsp; &nbsp;
.>>
Perform a relational join operation. (2.30+)
All records come from the current data set; left side records are selected using the \fCleftselect\fR
attribute and right side records are selected using \fCrightselect\fR.
The records are joined on one or more fields specified in the \fCfields\fR attribute.
\fBInput data must be sorted\fR on these fields (integer fields should be ordered numerically; alphanumeric
fields should be ordered alphabetically).
One (and only one) left side record and one (and only one) right side record must exist in order to be joined
(but see leftjoin and rightjoin below).
For example, suppose we want a scatterplot where the X component and Y component
are represented in different sets of records within the data set:
.nf
	001 X 4.3		001 X 4.3 001 Y 5.2
	001 Y 5.2	-->	002 X 3.2 002 Y 2.9
	002 X 3.2
	002 Y 2.9
.fi
In order to do a scatterplot of X vs. Y we need to do a join so that all data for case 001 are
on the same row, and all data for case 002 are on the same row.  We can do this using:
.nf
	#proc processdata
	showdata: yes
	action: join
	fields: 1
	leftselect: @@2 = X
	rightselect: @@2 = Y
.fi
Also available are \fBaction: leftjoin\fR and \fBaction: rightjoin\fR.  
With a left join, if a left side record exists with no right side companion, the right side 
is filled in with a missing data code (\fC=\fR by default; can be specified in \fCmissingdatacode\fR 
attribute).  A right join is the same thing but in reverse.

.ig >>
<br><br><br>
.>>

.IP \0
\fBaction: numberrows\fR
.ig >>
&nbsp; &nbsp;
.>>
Prepend a row number field to each row.  For example:
.nf
	A AA AAA 0		1 A AA AAA 0
	B BB BBB 0     --->  	2 B BB BBB 0
	C CC CCC 1		3 C CC CCC 1
	D DD DDD 1		4 D DD DDD 1
	E EE EEE 0		5 E EE EEE 0
	F FF FFF 1		6 F FF FFF 1
.fi

.ig >>
<br><br><br>
.>>

.IP \0
\fBaction: percents\fR  
.ig >>
&nbsp; &nbsp;
.>>
Rewrite one or more fields as percentages of its field (column) total; 
all other fields are passed through transparently.
The field(s) to operate on must be given in the \fCfields\fR attribute.
The TOTALS variable is also set to the column (field) total.
For example (\fCfields: 1\fR):
.nf
	8		40
	4	   -->	20
	3		15
	5		25
.fi

.ig >>
<br><br><br>
.>>
.IP \0
\fBaction: raccumulate\fR
.ig >>
&nbsp; &nbsp;
.>>
Rightward accumulation operation on selected data fields (typical use is to prepare data 
for a stacked bar or stacked area graph).
All other fields are passed through transparently.
The fields to operate on must be given in the \fCfields\fR attribute.
(New in version 2.40).
Example (\fCfields: 2 3 4):
.nf
	AA 3 6 1  -->   AA 3 9 10
	BB 1 0 4        BB 1 1 5
	CC 2 n/a 1      CC 2 2 3
.fi


.ig >>
<br><br><br>
.>>
.IP \0
\fBaction: reverse\fR  
.ig >>
&nbsp; &nbsp;
.>>
The last record becomes the first one; the
record order is reversed. For example:
.nf
	AXB 34		DIF 14
	BYA 22	   -->	CES 52
	CES 52		BYA 22
	DIF 14		AXB 34 
.fi

.ig >>
<br><br><br>
.>>
.IP \0
\fBaction: rotate\fR  
.ig >>
&nbsp; &nbsp;
.>>
First row becomes 1st field, 2nd row
becomes 2nd field, and so on.  This may be useful
in that most of the plotting procs work from data fields,
but sometimes data is given (or is more intuitive) in rows.
For example:
.nf
	A 2 4 6 8 10	-->	A B
	B 3 6 9 12 15		2 3
				4 6
				6 9
				8 12
				10 15
.fi

.ig >>
<br><br><br>
.>>
.IP
\fBaction: segment\fR  
.ig >>
&nbsp; &nbsp;
.>>
Similar to \fCaction: count\fR, except that instead of a count result, a range is produced,
useful for plotting bar segments, etc.
Resulting data set will always have three fields: 1) key field, 2) start position, 3) end position.
.IP
If one \fCfield\fR is specified, the start and end position will be record numbers of the first
and last records in the range (where first record is 1).  The result field names will be \fCbin startrow endrow\fR.
For example (\fCfields: 1\fR):
.nf
	062698			062698 1 3
	062698          --->	070198 4 6
	062698			070498 7 7
	070198
	070198
	070198
	070498
.fi
If two \fCfields\fR are specified, the start and end position will be the contents of the second
specified field, for the first and last records in the range. The result field names will be \fCbin startval endval\fR.
For example (\fCfields: 1 2\fR):
.nf
	062698 A		062698 A C
	062698 B         --->	070198 D F
	062698 C		070498 G G
	070198 D
	070198 E
	070198 F
	070498 G
.fi
.ig >>
<br><br>
.>>

.IP
\fBaction: segmentb\fR 
.ig >>
&nbsp; &nbsp;
.>>
Same as \fCaction: segment\fR, except that groups will butt up against one another.
For example (\fCfields: 1 2\fR):
.nf
	062698 A		062698 A D
	062698 B         --->	070198 D G
	062698 C		070498 G G
	070198 D
	070198 E
	070198 F
	070498 G
.fi

.ig >>
<br><br>
.>>
.IP \0
\fBaction: summary\fR
.ig >>
&nbsp; &nbsp;
.>>
Produce a new data set containing summary statistics on the input, clustering on specified "break" fields.
Specify \fCvalfield\fR as the data field containing numeric values to be examined.  
Specify \fCfields\fR as one or more identifying "break" fields.
The \fCcomplen\fR attribute (see below) can be used to control the number of characters examined in comparisons.
Processing involves examining data rows one at a time, and when a difference in any of the break fields is detected
the mean and other stats are computed on valfield for the current group of records, and one result row is added to the new data set.
The result data set will always have the following fields, named as shown:
\fCid1\fR, (\fCid2\fR etc.), \fCmean\fR, \fCsd\fR, \fCsem\fR, \fCn_obs\fR, \fCmin\fR, \fCmax\fR, \fCsum\fR.  
\fBInput data must be sorted\fR (or at least clustered) on the break fields.
(New in version 2.40)
.IP \0
Here's an example (fields: 1 2 3 and valfield: 5):
.nf
   2909 WSB/EiJ f 1 1           
   2909 WSB/EiJ f 2 3    ---->  2909 WSB/EiJ f 2.25 0.886405 0.313392 8 1 3 18
   2909 WSB/EiJ f 3 3           2909 WSB/EiJ m 2.6 0.894427 0.4 5 1 3 13
   2909 WSB/EiJ f 4 3
   2909 WSB/EiJ f 6 2
   2909 WSB/EiJ f 7 2
   2909 WSB/EiJ f 8 3
   2909 WSB/EiJ f 9 1
   2909 WSB/EiJ m 13 3
   2909 WSB/EiJ m 15 3
   2909 WSB/EiJ m 16 3
   2909 WSB/EiJ m 18 3
   2909 WSB/EiJ m 19 1
.fi
In the above example, the result data set would then have fields named:
\fCid1 id2 id3 mean sd sem n_obs min max sum\fR

.ig >>
<br><br><br>
.>>

.IP \0
\fBaction: summaryplus\fR
.ig >>
&nbsp; &nbsp;
.>>
Same as \fCaction: summary\fR above, except that median, and 5th, 25th, 75th, and 95th percentiles are computed as well.
(New in version 2.40)
The result data set will always have the following fields, named as shown:
\fCid1\fR, (\fCid2\fR etc.),  \fCmean\fR  \fCsd\fR  \fCse\fR  \fCn_obs\fR  \fCmin\fR  \fCmax\fR  \fCsum\fR  \fCpctl5th\fR  \fCpctl25th\fR  \fCmedian\fR  \fCpctl75th\fR  \fCpctl95th\fR

.ig >>
<br><br><br>
.>>
.IP \0
\fBaction: stats\fR
.ig >>
&nbsp; &nbsp;
.>>
Scan all eligible data rows and 
find the mean, SD, min, max, etc. for specified data field(s), and put mean, SD, min, max (etc) into ploticus variables.  
No new data set is created. 
The data field(s) to operate on should specified in the \fCfields\fR attribute.  
Sets the following ploticus variables:
.br
\fBMEAN\fR = mean of all numeric values found
.br
\fBSD\fR = standard deviation
.br
\fBN\fR = number of numeric values found
.br
\fBMIN\fR = the lowest numeric value found
.br
\fBMIN_ID\fR = contents of identifier/abscissa field in data row where minima was found
.br
\fBMAX\fR = the highest numeric value found
.br
\fBMAX_ID\fR = contents of identifier/abscissa field in data row where maxima was found
.br
\fBNMISSING\fR = number of non-numeric observations
.br
\fBTOTAL\fR = sum of all numeric values in the field
.IP 
(The following is a change in functionality starting in 2.31:)
This action can operate on one data field or several.  
The data field(s) to operate on should specified in the \fCfields\fR attribute.  
If more than one data field is specified, the data values from all the fields will be examined as
a group and the result will still be a single mean, SD, etc. 
\fCtagfield\fR may be specified (see below) to indicate an identifier or abscissa field 
which will be used to identify min and max cases (MIN_ID and MAX_ID) and may be useful in annotating 
the min and/or max with a later invocation of #proc annotate.


.ig >>
<br><br><br>
.>>

.IP \0
\fBaction: total\fR  
.ig >>
&nbsp; &nbsp;
.>>
Scan all eligible data rows, compute field total(s) and place it/them into the variable
TOTALS (see above).  No new data set is created.
Field(s) to be totalled are specified in the \fCfields\fR attribute.
.br
If only one field is being operated on, TOTALS will be a single numeric value.
If more than
one field is being operated on, TOTALS will be a comma-delimited
list of numeric values; individual totals may be accessed in your script
using something like the following, which would access the first
total in the list: \fC#set T = $nmember(1,@TOTALS)\fR
.br
The decimal format of the total(s) is controlled by the \fCresultformat\fR
attribute.  If total(s) are to be written in presentable notation
(a spacer for thousands, etc.) the \fCresultformat\fR attribute may be
preceded by a \fCn\fR, e.g. \fCn%7.0f\fR.

.ig >>
<br><br><br>
.>>

.SH Other attributes

.LP
\fBfields\fR 
.ig >>
&nbsp; &nbsp;
.>>
.ig >>
<a href="attributetypes.html#dfield">
.>>
\0dfield
.ig >>
</a>
.>>
list
.IP \0
The field(s) to be operated on.  Required for any \fCaction\fR that involves
data fields.
.br
Example: \fCfields: 2 5 6 7\fR

.ig >>
<br><br>
.>>
.LP
\fBshowresults\fR 
.ig >>
&nbsp; &nbsp;
.>>
\fCyes | no\fR
.br
(alias \fBshowdata\fR)
.IP \0
If \fCyes\fR the result data set is written to the diagnostic stream in bar-delimited format.

.ig >>
<br><br>
.>>

.LP
\fBkeepfields\fR
.ig >>
&nbsp; &nbsp;
.>>
.ig >>
<a href="attributetypes.html#dfield">
.>>
\0dfield
.ig >>
</a>
.>>
list
.IP \0
If specified, only these fields will be kept.  Other fields will be not be present in the result.
May be used with any \fCaction\fR except where otherwise noted.
If data set field names are being used they must be manually reset using \fCfieldnames\fR.
.br
Example: \fCkeepfields:  4 5 6\fR

.ig >>
<br><br>
.>>
.LP
\fBrejectfields\fR
.ig >>
&nbsp; &nbsp;
.>>
.ig >>
<a href="attributetypes.html#dfield">
.>>
\0dfield
.ig >>
</a>
.>>
list
.IP \0
If specified, these fields will not be present in the result. All other fields will be retained.
May be used with any \fCaction\fR except where otherwise noted.
If data set field names are being used they must be manually reset using \fCfieldnames\fR.
.br
Example: \fCrejectfields:  1 2 3 4\fR

.ig >>
<br><br>
.>>
.LP
\fBtagfield\fR
.ig >>
&nbsp; &nbsp;
.>>
.ig >>
<a href="attributetypes.html#dfield">
.>>
\0dfield
.ig >>
</a>
.>>
.IP \0
Used with \fCaction: stats\fR to specify an identifier or abscissa data field,
which will be used to identify min and max cases.

.ig >>
<br><br>
.>>
.LP
\fBfieldnames\fR 
.ig >>
&nbsp; &nbsp;
.>>
\fInamelist\fR
.IP \0
If specified, result data fields will be assigned the given names.
These names can later be used in any plotting proc to identify data fields.  
\fInamelist\fR is a space- or comma- delimited list of names.  
Names may include any alphanumeric characters with a maximum length of 38, and are case-insensitive.
.br
Note that if field names are specified in \fBproc getdata\fR 
and then \fBproc processdata\fR is used to alter the order of fields or 
delete fields, then this \fCfieldnames\fR attribute \fBmust\fR be
used in order to redefine the field names properly.
.br
Example: \fCfieldnames: date group n\fR

.ig >>
<br><br>
.>>
.LP
\fBcomplen\fR
.ig >>
&nbsp; &nbsp;
.>>
nchars
.IP \0
May be used with certain actions as noted above, to control the number of characters that are examined 
when comparing or processing the field(s) of interest.  
May be 50 or lower.  Default is 50.

.ig >>
<br><br>
.>>
.LP
\fBbinsize\fR
.ig >>
&nbsp; &nbsp;
.>>
\fInumber\fR | \fCweek | month | quarter | year | day | hour\fR
.IP \0
May be used with \fCaction: count\fR to tabulate on numeric or chronological bins.
If a \fInumber\fR is given, numeric bins of size \fInumber\fR are created, and numeric data are expected.
If \fCweek\fR, \fCmonth\fR, or any of the other chronological specifications are given, chronological
bins are created and date, time, or datetime data are expected.

.ig >>
<br><br>
.>>
.LP
\fBbinmod\fR
.ig >>
&nbsp; &nbsp;
.>>
\fCmid | low | high | start\fR
.IP \0
Used with \fCbinsize\fR.  This determines what the presented identifiers for the bins will be.
If \fCmid\fR (the default) the identifier will be midrange.  \fCstart\fR is equivalent to \fClow\fR
but makes more sense with chronological data.

.ig >>
<br><br>
.>>

.LP
\fBresultformat\fR 
.ig >>
&nbsp; &nbsp;
.>>
.ig >>
<a href="attributetypes.html#printfspec">
.>>
\0printf-spec
.ig >>
</a>
.>>
.IP \0
Controls the decimal format of rewritten percents, accumulations, totals.
Default is \fC%g\fR.
.br
Example: \fCresultformat: %f\fR
.br
Example for \fCaction: totals\fR (see above): \fCresultformat: n%g\fR

.ig >>
<br><br>
.>>

.LP
\fBkeepall\fR 
.ig >>
&nbsp; &nbsp;
.>>
\fCyes\fR | \fCno\fR
.IP \0
May be used with accumulate, raccumulate, percent, or total.
If \fCyes\fR, fields that are normally replaced by newly computed values will remain in the result along 
with the newly computed fields.  For example, with \fCaction: percents\fR this would allow the original values 
to be present in the result along with the computed percents.  Default is \fCno\fR.

.ig >>
<br><br>
.>>

.LP
\fBselect\fR 
.ig >>
&nbsp; &nbsp;
.>>
.ig >>
<a href="select.html">
.>>
\0selection expression
.ig >>
</a>
.>>
.IP \0
Used when \fCaction\fR is \fCselect\fR in order to specify the selection 
condition.  \fCselect\fR can be used along with any \fCaction\fR.
.br
Example: \fCselect: @@4 = A\fR

.ig >>
<br><br>
.>>



.LP
\fBleftselect\fR
.ig >>
&nbsp; &nbsp;
.>>
.ig >>
<a href="select.html">
.>>
\0select expression
.ig >>
</a>
.>>
.br
\fBrightselect\fR
.ig >>
&nbsp; &nbsp;
.>>
.ig >>
<a href="select.html">
.>>
\0select expression
.ig >>
</a>
.>>
.IP \0
Used with \fCaction: join\fR (and \fCleftjoin\fR and \fCrightjoin\fR).
Specifies selection conditions for left side of join and right side of join.

.ig >>
<br><br>
.>>

.LP
\fBmissingdatacode\fR
.ig >>
&nbsp; &nbsp;
.>>
string
.IP \0
Used with \fCaction: leftjoin\fR and \fCaction: rightjoin\fR to specify a missing data code to use for
filling in missing fields.

.ig >>
<br><br>
.>>
.LP
\fBvalfield\fR
.ig >>
&nbsp; &nbsp;
.>>
.ig >>
<a href="attributetypes.html#dfield">
.>>
\0dfield
.ig >>
</a>
.>>
.IP \0
With \fCaction: summary\fR, the data field holding the numeric value from which average (etc.) is to be computed.


.ig >>
<br><br>
.>>


.ig >>
<br><br>
.>>
.LP
\fBoutfile\fR 
.ig >>
&nbsp; &nbsp;
.>>
\fIfilename\fR
.IP \0
If specified, results are written in tab-delimited format to \fIfilename\fR and are not retained in memory
as a new data set.  This can be done to make the result available to other programs or to read in again using 
proc getdata.


.ig >>
<br><br>
.>>
.LP
\fBstack\fR 
.ig >>
&nbsp; &nbsp;
.>>
\fCyes\fR | \fCno\fR
.IP \0
If \fCno\fR, the result data set replaces the original data set in memory (this might be desired for larger data sets).
\fBDiscontinued in version 2.40\fR... all results are stored in memory except when \fCoutfile\fR is specified.

.ig >>
<a name=breaks></a>
.>>
.ig >>
<br><br><br>
.>>

.SH More on break processing
.LP
\fCaction: breaks\fR performs break processing, which is
useful for stepping through a sorted data set one chunk at a time and producing a plot for each chunk.
\fBInput data must be sorted\fR (or at least clustered ) on the break fields.
Specify \fCfields\fR as one or more (max 5) identifying "break" fields.
The \fCcomplen\fR attribute (see below) controls number of characters examined in comparisons.
Processing involves examining data rows one at a time, and when a difference in any of the break fields is detected
processing stops.  This action is generally used within a loop as shown below.
.nf
\0	#loop
\0	   #proc processdata
\0	     action: breaks
\0	     fields: 1 2 3
\0	   #proc endproc
\0
\0	   #if @NRECORDS = 0
\0	     #break
\0	   #endif
\0
\0	   #proc page
\0	   title: Account @BREAKFIELD1
\0
\0	   #proc bars
\0	   ...
\0
\0         #proc usedata
\0           original: yes
\0
\0	 #endloop
.fi
.LP
Your script can access the current contents of the break field(s) via the
\fBBREAKFIELD1 .. n\fR variable(s).
Your script can detect when the entire data set has been processed by checking 
if NRECORDS = 0 

.ig >>
<br>
<br>
</td></tr>
<td align=right>
<a href="../doc/welcome.html">
<img src="../doc/ploticus.gif" border=0></a><br><small>data display engine &nbsp; <br>
<a href="../doc/Copyright.html">Copyright Steve Grubb</a>
<br>
<br>
<center>
<img src="../gallery/all.gif"> 
</center>
</td></tr>
</table>
<br>
<center>
Ploticus is hosted at http://ploticus.sourceforge.net <br>
<img src="http://sourceforge.net/sflogo.php?group_id=38453" width="88" height="31" border="0" alt="SourceForge Logo">
</center>
.>>
