user manual
Chapter
8
88
8
CLEM Language Reference
CLEM Reference Overview
This section describes the Control Language for Expression Manipulation (CLEM), which is a
powerf ul tool used to analyze and manipula te 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 About CLEM 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 th e same data manipulations in an automat ed fashion.
CLEM expressions c onsist of values, field names, operators, and functions. Using the correct
syntax, you can create a wide variety of p owerful data operations. For more informatio n, see the
topic CLEM Examples in Chapter 7 on p. 108.
CLEM Datatypes
CLEM datatypes can be made up of any o f the following:
Intege r s
Reals
Characters
Strings
Lists
Fields
Date/Time
Rules for Quoting
Although IBM® SPSS® Modeler is flexible when y ou are determining the fields, values,
parameters, and st r ings used in a CLEM expression, the following general rules prov ide a list of
“good practices” to use in creating expr essions:
Strings—Always use double quotes when writing strings, suc h a s "Type 2". Single qu otes can
be used instead but at the risk of confusion with qu oted fields.
Fields—Use sing le quotes only where necessary to enclose spaces or other special characters,
such as 'Order Number'. Fields that are quoted but un defined in the data set will be misread
as string s.
Parameters—Always use single quotes wh en using parameters, such as '$P-threshold'.
Characters—A lways use single backquotes (`), such as stripchar(`d`, "drugA").
© Copyright IBM Corporation 1994, 2012.
127