.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 print</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 print</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_print PL "15-JAN-2008   PL ploticus.sourceforge.net"

.LP
\fBproc print\fR may be used to print messages and debugging info.
It can print the contents of variables and/or
data fields to a file or to standard error.
It is mainly useful for displaying or exporting information
pertaining to outlier cases and for debugging a script.
Unless the \fCoutfile\fR attribute is specified, information is
printed to the file/stream controlled by the \fB-diagfile\fR
command line option.

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

.SH This proc is deprecated
This proc is now deprecated and may be removed from future releases.
The \fC#write / #endwrite\fR 
.ig >>
<a href="scriptsyntax.html">
.>>
\0script directives
.ig >>
</a>
.>>
provide similar functionality.

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

.SH Attributes
.LP
\fBlabel\fR 
.ig >>
&nbsp; &nbsp;
.>>
text
.IP \0
Arbitrary text that will be printed once.  May include
@variable references using one at-sign (@).  Typically
used to examine contents of variables or to print a header
for the cases listed by the \fCselect\fR and \fCprint\fR attributes.

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

.LP
\fBselect\fR 
.ig >>
&nbsp; &nbsp;
.>>
.ig >>
<a href="select.html">
.>>
\0select expression
.ig >>
</a>
.>>
.IP \0
Selects data records to print, using the \fCprint\fR template.

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

.LP
\fBprint\fR 
.ig >>
&nbsp; &nbsp;
.>>
text
.IP \0
A template which may include variable and data field references.
This template will be printed once for every data record
that passes the selection condition.
Data fields are referenced by preceding with two at-signs (@@).
See example below.

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

.LP
\fBoutfile\fR 
.ig >>
&nbsp; &nbsp;
.>>
\fIfilename\fR
.IP \0
If specified, the results of proc print will be written to this file.
If unspecified, results are written to the diagnostic stream (controllable
using -diagfile on command line). 

.ig >>
<br><br>
.>>
.LP
\fBoutmode\fR  
.ig >>
&nbsp; &nbsp;
.>>
\fCw | a\fR
.IP \0
Controls the file write mode for \fCoutfile\fR.  Default is \fCw\fR.
w = write (create new file / erase
any current contents); a = append (append to any existing contents; if none then
create new file).  See also fopen(2).

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

.SH Variables that are set by proc print
\fBNSELECTED\fR is set to the number of records selected.
Thus proc print may be used to count number of records meeting a certain criteria.

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

.SH Example
.nf
\0#set TODAY = $todaysdate()
\0#proc print
\0label: Outliers (run on @TODAY)
\0select: @@3 > 300
\0print: @@1 @@2 had a score of @@3

.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>
.>>
