IBM 15 Switch User Manual


 
153
CLEM Language Reference
Function
Result
Description
@MAX(FIELD, EXPR)
Number
Returns the maximum value for FIELD over the l ast
EXPR records received so far, including the curren t
record. FIELD must be the name of a numeric eld.
EXPR may be any expression evaluating to an integer
greater than 0.
@MAX(FIELD, EXPR, INT)
Number
Returns the maximum value for FIELD over the l ast
EXPR records received so far, including the curren t
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 the
number of records received s o far, the maximum value
over all of the records received so far i s returned.
INT species the maximum number of values to look
back. This is far more efcient than using just t wo
arguments.
@MIN(FIELD
)
Number
Returns the minimum value for the specied FIELD.
@MIN(FIELD, EXPR)
Number
Returns the mi nimum value for FIELD o ver the last
EXPR records received so far, including the curren t
record. FIELD must be the name of a numeric eld.
EXPR may be any expression evaluating to an integer
greater than 0.
@MIN(FIELD, EXPR, INT)
Number
Returns the mi nimum value for FIELD o ver the last
EXPR records received so far, including the curren t
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 the
number of records received so far, the minimum value
over all of the records received so far i s returned.
INT species the maximum number of values to look
back. This is far more efcient than using just t wo
arguments.
@OFFSET(FIELD, EXPR)
Any
Returns the value of FIELD in the record offset from
the current r ecord by the value of EXPR. A positive
offset refers to a record that has already passed, while
a negative one species a “lookahead” to a record that
has yet to arrive. For example, @OFFSET(Status, 1)
returns t he value of the Status eld in the previous
record, while @OFFSET(Status, –4) “looks ahead ”
four records in the sequence (that is, to records that
have not yet passed through this node) to obtain the
value. Note that a negative (look ahead) offset must
be specied as a constant. For positive offsets only,
EXPR may also be an arbitrary CLEM expression,
which is evaluated for the current record to give the
offset. In this case, the three-argument version of
this function should improv e performance (see next
function). If the expression returns anything ot her
than a non-negative integer, this causes an error—that
is, it is not legal to have calculated lookahead offsets.
Note: A self-referential @OFFSET function cannot use
literal lookahead. For example, in a Filler node, you
cannot replace the value of field1 using an expression
such as @OFFSET(field1,-2).