IBM 15 Manuale Utente

Pagina di 270
134
Chapter 8
Convention
Description
INTINT1INT2
Any integer, such as
1 or –77.
CHAR
A character code, such as
`A`.
STRING
A string, such as
"referrerID".
LIST
A list of items, such as
["abc" "def"].
ITEM
A field, such as Customer or extract_concept.
DATE
A date field, such as start_date, where values are in a format
such as
DD-MON-YYYY.
TIME
A time field, such as power_flux, where values are in a format
such as
HHMMSS.
Functions in this guide are listed with the function in one column, the result type (integer, string,
and so on) in another, and a description (where available) in a third column. For example, the
following is the description of the
rem function.
Function
Result
Description
INT1 rem INT2
Number
Returns the remainder of INT1 divided by INT2. For
example,
INT1 – (INT1 div INT2) * INT2.
Details on usage conventions, such as how to list items or specify characters in a function, are
described elsewhere. For more information, see the topic
on p. 127.
Information Functions
Information functions are used to gain insight into the values of a particular field. They are
typically used to derive flag fields. For example, you can use the @BLANK function to create a flag
field indicating records whose values are blank for the selected field. Similarly, you can check the
storage type for a field using any of the storage type functions, such as is_string.
Function
Result
Description
@BLANK(FIELD)
Boolean
Returns true for all records whose values are blank
according to the blank-handling rules set in an upstream
Type node or source node (Types tab). Note that this
function cannot be called from a script.
@NULL(ITEM)
Boolean
Returns true for all records whose values are undefined.
Undefined values are system null values, displayed in
IBM® SPSS® Modeler as
$null$. Note that this function
cannot be called from a script.
is_date(ITEM)
Boolean
Returns true for all records whose type is a date.
is_datetime(ITEM)
Boolean
Returns true for all records whose type is a date, time,
or timestamp.
is_integer(ITEM)
Boolean
Returns true for all records whose type is an integer.
is_number(ITEM)
Boolean
Returns true for all records whose type is a number.
is_real(ITEM)
Boolean
Returns true for all records whose type is a real.
is_string(ITEM)
Boolean
Returns true for all records whose type is a string.
is_time(ITEM)
Boolean
Returns true for all records whose type is a time.
is_timestamp(ITEM)
Boolean
Returns true for all records whose type is a timestamp.