Chapter
8
88
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.
Youcan use CLEM within nodes to perfor m 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. 1 05.
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, eld names, operators, and functions . Using the correct
syntax, you can create a wide variety of powerful data operations. For more information, see the
topic CLEM Examples 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 exible when you are determining the elds, va lues,
parameters, and strings used in a CLEM expression, the following general rule sp rovide a list of
“good practices” to use in creating expressions:
Strings—Always use double quotes when writing strings, such as "Type 2". Single q uotes can
be used instead but at the risk of confusion with quoted elds.
Fields—Use single quotes only where necessary to enclose spaces or other special characters,
such as 'Order Number'. Fields that are quoted but u ndened 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`, "dr ugA").
© Copyright IBM Corporation 1994, 2012. 127