IBM 15 Manual Do Utilizador

Página de 270
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, \\.) You can use
single quotes around a string, but the result is indistinguishable from a quoted field ('referrerID').
For more information, see the topic
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"]. Lists are not used as the value
of IBM® SPSS® Modeler fields. 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 field names. You
can write these simply as
Power, val27, state_flag, and so on, but if the name begins with a 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 answer', '#101',
'$P-NextField'.
Note: Fields that are quoted but undefined in the data set will be misread as strings.
Dates
Date 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 topic
in Chapter 5 on p. 55.
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
the 32nd 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