IBM 15 Switch User Manual


 
152
Chapter 8
For this reason, @SINCE does not evaluate its condition for the current record. Use a similar
function, @SI
NCE0, if you want to evaluate the condition for the current record as well as previous
ones; if the condition is true in the current record, @SINCE0 returns 0.
Note: @ functions cannot be called from scripts .
Function
Result
Description
MEAN(FIELD)
Real
Returns the mean average of values for the specied
FIELD or FIELDS.
@MEAN(FIELD, EXPR)
Real
Returns the mean average of values for FIELD over
the last EXPR records recei ved by the current node,
including the current record. FIELD must be the name
of a numeric eld. EXPR may be any expression
evaluating to an integer greater than 0. If EXPR is
omitted or if it exceeds t he num ber of records received
so far, the average over all of the records received
so far is returned. Note that this function cannot be
called from a script.
@MEAN(FIELD, EXPR, INT)
Real
Returns the mean average of values for FIELD over
the last EXPR records recei ved by the current node,
including the current record. FIELD must be the name
of a numeric eld. EXPR may be any expression
evaluating to an integer greater than 0. If EXPR is
omitted or if it exceeds t he num ber of records received
so far, the average over all of the records received so
far is returned. INT species the maximum number
of values to look back. This is far more efcient than
using jus t two arguments.
@DIFF1(FIELD)
Real
Returns the rst differential of FIELD1. The
single-argument form thus simply returns the
difference between the current value and the previous
value of the eld. R et urns 0 if the relevant previ ous
records do not exist.
@DIFF1(FIELD1, FIELD2)
Real
The two-argument form gives the rst differential of
FIELD1 with respect to FIELD2. Returns 0 if the
relevant previous records do not exist.
@DIFF2(FIELD)
Real
Returns the second differential of FIELD1. The
single-argument form thus simply returns the
difference between the current value and the previous
value of the eld. R et urns 0 if the relevant previ ous
records do not exist
@DIFF2(FIELD1, FIELD2)
Real
The two-argument form gives the rst differential of
FIELD1 with respect to FIELD2. Returns 0 if the
relevant previous records do not exist.
@INDEX
Integer
Returns the index of the current record. Indices are
alloc
ated to records as they arrive at the current node.
The rst record is given index 1, and the index is
incremented by 1 for each subsequent record.
@LAST_NON_BLANK(FIELD)
Any
Returns the last valu e for FIELD that was not blank,
as dened in an upstream source or Type node.
If there are no nonblank values for FIELD in the
records read so far, $null$ is returned. Note that blank
values, also called user-missing values, can be dened
separately for each eld.
@MAX(FIELD)
Number
Returns the maximum value for the specied FIELD.