proc print


Version 2.33 Jun'06

Scripts


Manual page for proc_print(PL)

proc print 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 outfile attribute is specified, information is printed to the file/stream controlled by the -diagfile command line option.


This proc is deprecated

This proc is now deprecated and may be removed from future releases. The #write / #endwrite script directives provide similar functionality.


Attributes

label     text

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 select and print attributes.

select     select expression

Selects data records to print, using the print template.

print     text

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.

outfile     filename

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

outmode     w | a

Controls the file write mode for outfile. Default is w. 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).


Variables that are set by proc print

NSELECTED is set to the number of records selected. Thus proc print may be used to count number of records meeting a certain criteria.


Example

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




data display engine  
Copyright Steve Grubb


Ploticus is hosted at http://ploticus.sourceforge.net
SourceForge Logo


Markup created by unroff 1.0,    June 02, 2006.