Skip to main content

Data & Intelligence

All about CLEM

SPSS CLEM is the control Language for Expression Manipulation, which is used to build expressions within SPSS Modeler streams. CLEM is actually used in a number of SPSS “nodes” (among these are the Select and Derive nodes) and you can check the product documentation to see the extended list.

CLEM expressions are constructed from:

  • Values,
  • Fields,
  • Operators (arithmetic, relational, logical operators) and
  • Functions

Scripting?

CLEM should not be confused with the scripting capability that both SPSS Statistics and SPSS Modeler offer (known as Syntax). Syntax scripting is more of an automation tool, while CLEM’s purpose is focused on specific data manipulations, however a subset of the CLEM language can be used when scripting in the user interface – supporting many of the same data manipulations in an automated fashion.

With “CLEM”, you have the power to (using expressions) do many things, such as:

  • Compare and evaluate conditions on record fields.
  • Derive values for new fields.
  • Derive new values for existing fields.
  • Reason about the sequence of records.
  • Insert data from records into reports

 

Using CLEM

In nodes like “Select” and “Derive”, expressions and conditions can be entered directly (by typing them in) or by using the SPSS Expression Builder. The Expression Builder is invoked by clicking the Launch expression builder button in the respective dialog (for example, in a Select node you click the Launch expression builder button to launch the Expression builder).

The Expression Builder provides a powerful tool to construct expressions and in addition, the Expression Builder can check the validity of your expression in real-time.

clem1

 

 

 

 

 

 

 

 

 

 

 

 

More on the Expression Builder

  • Across the top of the Expression Builder dialog is where you can enter your expression directly (or where the generated expression ends up).
  • “General Functions” list all available SPSS functions available to the expression builder.
  • The middle of the dialog shows the expression operators for selection.
  • Under “Fields” you can view and select a field (from your data) to be used in the expression.
  • When you click on a function, its description is displayed under the Function list.
  • You can use the “Check” button to test the syntax of your expression.
  • A value can be picked from a list of values (provided the field has been instantiated) by clicking the fields Value button or right clicking on the field itself.
Data Intelligence - The Future of Big Data
The Future of Big Data

With some guidance, you can craft a data platform that is right for your organization’s needs and gets the most return from your data capital.

Get the Guide

Scripting and Expressions in Cognos TM1

In Cognos TM1, the closest thing to the SPSS expression builder is its rules editor. Which started out “pretty rudimentary” in form:

 

clem2

 

 

 

 

 

In more recent versions, TM1 introduced the “advanced rules editor” (remember, you have to set the TM1p.ini AdvancedRulesEditor = T setting to access this editor) with its specific tools to help you create, manage, and verify TM1 rules. This Rules Editor has a full set of menus for creating, editing, and managing rules. Keyboard shortcuts are provided for the more commonly used menu options.

clem3

 

 

 

 

 

The advanced version of TM1’s rule editor is similar to the SPSS Expression builder in that it allows the developer to either enter the express (the rule) directly (type it in) or “build it” from dialog selections such as the Insert Function button (which then displays the Insert Function dialog allowing you to select a function and even the function parameters from succeeding dialogs):

clem4

 

 

 

 

 

 

 

 

 

 

 

 

Conclusion

If you are a TM1 developer and have written your share of TM1 rules, you will feel comfortable with the concept of using CLEM and the expression builder with in SPSS Modeler.

 

 

 

 

Jim Miller

Mr. Miller is an IBM certified and accomplished Senior Project Leader and Application/System Architect-Developer with over 30 years of extensive applications and system design and development experience. His current role is National FPM Practice Leader. His experience includes BI, Web architecture & design, systems analysis, GUI design and testing, Database modeling and systems analysis, design, and development of Client/Server, Web and Mainframe applications and systems utilizing: Applix TM1 (including TM1 rules, TI, TM1Web and Planning Manager), dynaSight - ArcPlan, ASP, DHTML, XML, IIS, MS Visual Basic and VBA, Visual Studio, PERL, Websuite, MS SQL Server, ORACLE, SYBASE SQL Server, etc. His Responsibilities have included all aspects of Windows and SQL solution development and design including: analysis; GUI (and Web site) design; data modeling; table, screen/form and script development; SQL (and remote stored procedures and triggers) development and testing; test preparation and management and training of programming staff. Other experience includes development of ETL infrastructure such as data transfer automation between mainframe (DB2, Lawson, Great Plains, etc.) systems and client/server SQL server and Web based applications and integration of enterprise applications and data sources. In addition, Mr. Miller has acted as Internet Applications Development Manager responsible for the design, development, QA and delivery of multiple Web Sites including online trading applications, warehouse process control and scheduling systems and administrative and control applications. Mr. Miller also was responsible for the design, development and administration of a Web based financial reporting system for a 450 million dollar organization, reporting directly to the CFO and his executive team. Mr. Miller has also been responsible for managing and directing multiple resources in various management roles including project and team leader, lead developer and applications development director. Specialties Include: Cognos/TM1 Design and Development, Cognos Planning, IBM SPSS and Modeler, OLAP, Visual Basic, SQL Server, Forecasting and Planning; International Application Development, Business Intelligence, Project Development. IBM Certified Developer - Cognos TM1 (perfect score 100% on exam) IBM Certified Business Analyst - Cognos TM1

More from this Author

Follow Us
TwitterLinkedinFacebookYoutubeInstagram