user manual

129
CLEM Language Reference
Strings
Generally, you should enclos e strings in double quotation marks. Exampl es of strings are
"c35product2" and "referrerID". To indicate special characters in a string, use a backslash–– f or
example, "\$65443". (To ind icate a b ackslas h character, us e a double backs lash, \\.) You ca n use
single quotes around a string, but the result is i ndistinguishable from a quoted el d ('referrerID').
For more info r mation, see the topic String Functions on p. 141.
Lists
A list is a n ordered sequence of elements, which may be of mixed type. Lists are enclos ed in
square brackets ([]). Examples of lists are [1 2 4 16] and ["abc" "def"]. Lists are not used as the value
of IB 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 assu med to be eld names. You
can write the se simply as Power, val27, state_flag, and so on, but if the name begins with a digit
or includes non-alphabe tic characters, such as spaces (with the exception of the underscore), place
the name within sing le quotation marks––for example , 'Power Increase', '2nd answer', '#101',
'$P-NextField'.
Note: Fields that are quoted but u ndened in the data set will be misread as strings.
Dates
Date calculations are b ased on a “ba seline” date, which is specied in the stream properties dialo g
box. The default baseline date is 1 January 1900. For more information, see the topi c Setting
general options for streams in Chapter 5 on p. 55.
The C LEM language supports the following date formats.
Format Examples
DDMMYY 150163
MMDDYY
011563
YYMMDD
630115
YYYYMMDD
19630115
YYYYDDD
Four-digit year followed by a thr ee-digit
number representing the day of the
year—for example, 2000032 represents
the 32nd day of 2000, or 1 February 2000.
DAY
Day of the week in the cu rrent
locale—for example, Monday, Tuesday,
..., in English.
MONTH
Month in the current locale—for
example, January, February, ….
DD/MM/YY 15/01/63