IBM 15 User Manual

Page of 270
110
Chapter 7
Frequently, special functions are used in combination, which is a commonly used method of
flagging blanks in more than one field at a time.
@BLANK(@FIELD)-> T
Additional examples are discussed throughout the CLEM documentation. For more information,
see the topic
in Chapter 8 on p. 127.
Values and Data Types
CLEM expressions are similar to formulas constructed from values, field names, operators, and
functions. The simplest valid CLEM expression is a value or a field name. Examples of valid
values are:
3
1.79
'banana'
Examples of field names are:
Product_ID
'$P-NextField'
where Product is the name of a field from a market basket data set, ’$P-NextField’ is the name
of a parameter, and the value of the expression is the value of the named field. Typically, field
names start with a letter and may also contain digits and underscores (_). You can use names that
do not follow these rules if you place the name within quotation marks. CLEM values can be
any of the following:
Strings—for example,
"c1", "Type 2", "a piece of free text"
Integers—for example,
12, 0, –189
Real numbers—for example,
12.34, 0.0, –0.0045
Date/time fields—for example, 05/12/2002, 12/05/2002, 12/05/02
It is also possible to use the following elements:
Character codes—for example,
`a` or 3
Lists of items—for example,
[1 2 3], ['Type 1' 'Type 2']
Character codes and lists do not usually occur as field values. Typically, they are used as
arguments of CLEM functions.
Quoting Rules
Although the software is flexible when determining the fields, values, parameters, and strings
used in a CLEM expression, the following general rules provide a list of “best practices” to use
when creating expressions:
Strings
—Always use double quotes when writing strings (
"Type 2" or "value"). Single quotes
can be used instead but at the risk of confusion with quoted fields.