IBM 15 Manual Do Utilizador

Página de 270
Chapter
8
8
8
8
CLEM Language Reference
CLEM Reference Overview
This section describes the Control Language for Expression Manipulation (CLEM), which is a
powerful tool used to analyze and manipulate the data used in IBM® SPSS® Modeler streams.
You can use CLEM within nodes to perform tasks ranging from evaluating conditions or deriving
values to inserting data into reports. For more information, see the topic
in
Chapter 7 on p. 105.
A subset of the CLEM language can also be used when you are scripting in the user interface.
This allows you to perform many of the same data manipulations in an automated fashion.
CLEM expressions consist of values, field names, operators, and functions. Using the correct
syntax, you can create a wide variety of powerful data operations. For more information, see the
topic
in Chapter 7 on p. 108.
CLEM Datatypes
CLEM datatypes can be made up of any of the following:
Integers
Reals
Characters
Strings
Lists
Fields
Date/Time
Rules for Quoting
Although IBM® SPSS® Modeler is flexible when you are determining the fields, values,
parameters, and strings used in a CLEM expression, the following general rules provide a list of
“good practices” to use in creating expressions:
Strings—Always use double quotes when writing strings, such as
"Type 2". Single quotes can
be used instead but at the risk of confusion with quoted fields.
Fields—Use single quotes only where necessary to enclose spaces or other special characters,
such as
'Order Number'. Fields that are quoted but undefined in the data set will be misread
as strings.
Parameters—Always use single quotes when using parameters, such as
'$P-threshold'.
Characters—Always use single backquotes (
`), such as stripchar(`d`, "drugA").
© Copyright IBM Corporation 1994, 2012.
127