IBM 15 Switch 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 manipulate the data used in IBM® SPSS® Modeler streams.
You can use CLEM within nodes to perform tasks ranging from evaluating conditions or d eriving
values to inserting data into reports. For more infor mation, see the topic Abo ut CLEM in
Chapter 7 on p. 105.
A su bset of the CLEM language can als o be used when yo u are s cripting in the user interface.
This allows you to perform many of the same da ta manipulati ons in a n 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 fo llowing:
Intege r s
Reals
Characters
Strings
Lists
Fields
Date/Time
Rules for Quoting
Although IBM® SPSS® Modeler is exible when y ou are determining the elds, 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 st r ings, such as "Type 2". Single quotes can
be used instead but at the risk of confusion with quoted elds.
Fields—Use single quotes only whe r e necessary to enclose spaces or other special characters,
such as 'Order Number'. Fields that are quo ted but undened in the data set will be misread
as string s.
Parameters—Always use single quotes when using parameters, such as '$P-threshold'.
Characters—A lways use sing le backquotes (`), such as stripchar(`d`, "drugA").
© Copyright IBM Corporation 1994, 2012.
127