
129
CLEM Language Reference
StringsGenerally, you should enclose strings in double quotation marks. Examples of strings are
"c35product2" and "referrerID". To indicate special characters in a string, use a backslash––for
example, "\$65443". (To indicate a backslash character, use a double backslash, \\.) Youcan use
single quotes around a string, but the result is indistinguishable from a quoted fiel d ('referrerID').
For more information, see the topic String Functions on p. 141.
ListsA list is an ordered sequence of elements, which may be of mixed type . Lists are enclosed in
square brackets ([]). Examples of lists are [1 2 4 16] and["abc" "def"]. Listsare not u sed as the value
of IBM® SPSS® Modeler fields. They are used to provide arguments to functions, such as
member and oneof.
FieldsNames in CLEM expressions that are not names of functions are assumed to be fiel d names. You
can write these simply as Power,val27,state_flag, and so on, but if the name begins witha digit
or includes non-alphabetic characters, such as spaces (with the exception of the underscore), place
the name within single quotation marks––for example, 'Power Increase','2nd answe r','#101',
'$P-NextField'.
Note: Fields that are quoted but undefined in the data set will bemisread a s strings.
DatesDate calculations are based on a “baseline” date, which is specified in the stream properties dialog
box. The default baseline date is 1 January 1900. For more information, see the to pic Setting
general options for streams in Chapter 5 on p. 5 5.
The CLEM language supports the following date formats.
Format Examples
DDMMYY 150163
MMDDYY 011563
YYMMDD 630115
YYYYMMDD 19630115
YYYYDDD Four-digit year followed by a three-digit
number representing the day of the
year—for example, 2000032 represents
the32nd day of 2000, or 1 February 2000.
DAY Day of the week in the current
locale—for example, Monday,Tuesday,
..., in English.
MONTH Month in the current locale—for
example, January,February, ….
DD/MM/YY 15/01/63