129
CLEM Language Reference
Strings
Generally, 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 el d ('referrerID').
For more information, see the topic String Functions on p. 141.
Lists
A 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 elds. They are used to provide arguments to functions, such as
member and oneof.
Fields
Names in CLEM expressions that are not names of functions are assumed to be el 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 undened in the data set will bemisread a s strings.
Dates
Date calculations are based on a “baseline” date, which is specied 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