Product:

Cognos Tm1 10.2.2 fix pack 6

Microsoft Windows 2008 R2 Server

Symptom:

When new updated express TM1 instance start, it is named = CXMD

Cause:

In the TM1S.CFG file the servername is as Servername = CXMD, but in TM1 you need to not have a space – it should be Servername=CXMD.

 

Uninstall the TM1 instance, change the TM1S.CFG to not use space at = , then start the service again from Cognos Configuration for TM1.

If you not have uninstalled Cognos Express – then the new start of TM1 instance with same name as a existing one will make it look like the new one is installed in Cognos Configuration, but in Windows services if you check on properties on the TM1 instance CXMD it will show it use the old Cognos express engine under \program files (x86)\ that make it not work.

You notice something is wrong if no log files are created in the new folder you have setup for the new TM1 instance – then there is a different folder in use, probably the old one.

 

Solution:

How to move a Cognos Express application to a TM1 10.2.2 application.

 

Make a backup of all excel sheets used in the TM1WEB part.

You need to login to Cognos Express with Tm1 architect and do savedataall step and take a backup of the data folder, mostly there exist a TI process already written for this.

Then copy the Cognos express folder c:\program files (x86)\IBM\cognos express\xcelerator\custom\tm1data\cxmd\ to your new folder for tm1 that in most cases are c:\program files\ibm\cognos\tm1_64\samples\tm1\cxmd\.

Recommend to create a separate folder for log files like this c:\program files\ibm\cognos\tm1_64\samples\tm1\cxmd_logs.

 

To get Cognos Express BI security you need to take screen shoots how it is setup in Cognos Express and then manually add the same AD groups to Cognos BI groups inside the New Cognos Connection on the new installation.

 

Download fix pack for TM1 and Cognos BI

https://www-945.ibm.com/support/fixcentral/swg/downloadFixes?parent=Cognos&product=ibm/Information+Management/Cognos+8+Business+Intelligence&release=10.2.2&platform=All&function=fixId&fixids=10.2.2-BA-CBI-Win64-FP007&includeRequisites=1&includeSupersedes=0&downloadMethod=http

Uninstall Cognos Express program from the server.

 

Install Cognos BI and setup IIS as show here:

http://www.ibm.com/developerworks/data/library/cognos/infrastructure/web_servers/page599.html

Active SSO for Cognos BI with this steps

http://www.ibm.com/support/knowledgecenter/SSEP7J_10.2.2/com.ibm.swg.ba.cognos.c8pp_inst.10.2.2.doc/t_stp_sso_active_drctry_remote_user.html

The connection to customers Active Directory must have the namespace id to be “CognosExpressActiveDirectoryID” set, to allow the users that before was setup in Cognos Express come in as the same user in the new TM1 solution.

Inside Cognos Configuration for BI,  under Security – Authentication, select New Resource – Namespace.

Set Name to domain.com and select Type to Active Directory.

Set the Namespace ID to CognosExpressActiveDirectoryID.

Set host and port to;  customer´s Domain.com:389

 

The name that you show in left for the authentication is what is shown inside Cognos Connection as the name of the namespace, the namespace ID is the Cognos BI internal ID and that should be the same as used in Cognos Express to ensure the users end up in the same rows inside TM1 security table.

Best Practices is to have this two field the same, that should mean namespace id is CognosExpressActiveDirectoryID in this case.

Install Cognos Tm1 10.2.2 and set it up as show here:

http://www.ibm.com/support/knowledgecenter/en/SSMR4U_10.2.2/com.ibm.swg.ba.cognos.express_migration.10.2.2.doc/t_express_inst_mig_install_tm1_start_servers.html

 

Install Cognos TM1 10.2.2 fix pack 6 new certs as of this page

http://www-01.ibm.com/support/docview.wss?uid=swg21991545

http://www-01.ibm.com/support/docview.wss?uid=swg21992411

 

Install SSO for TM1 applications by following this steps:

https://allthingscognos.wordpress.com/2014/08/26/configuring-performance-modeller-and-tm1-web-with-cam-security-for-tm1-10-2-n/

 

In the new CXMD data folder – remove the tm1s.cfg and TM1.lic files.

Create a new TM1S.CFG file with content like this:

[TM1S]

 CAMPortalVariableFile=portal/variables_TM1.xml

Language=ENG

IntegratedSecurityMode=5

ClientMessagePortNumber=12307

DataBaseDirectory=C:\Program Files\ibm\cognos\tm1_64\samples\tm1\CXMD

UseSSL=T

PortNumber=12306

ClientPingCAMPassport=900

LoggingDirectory=C:\Program Files\ibm\cognos\tm1_64\samples\tm1\CXMD_logs

ServerName=CXMD

 

AdminHost=

ForceReevaluationOfFeedersForFedCellsOnDataChange=T

DistributedPlanningOutputDir=.\tunit

AllowSeparateNandCRules=T

ServerCAMIPVersion=ipv4

IPVersion=ipv4

 

ClientCAMURI=http://BISERVER.domain.com/ibmcognos/cgi-bin/cognosisapi.dll

ServerCAMURI=http://BISERVER.domain.com:9300/p2pd/servlet/dispatch

##ServerCAMURI=http://EXPRESSSERVER.domain.com:9300/p2pd/servlet/dispatch

##ClientCAMURI=http://EXPRESSSERVER.domain.com:9300/p2pd/servlet/dispatch

ParallelInteraction=T

SupportPreTLSv12Clients=T

Update the BISERVER values with your server and domain name in above file.

Inside Cognos Configuration for TM1 click on TM1 server – New Resource – TM1 server instances.  Enter CXMD as name.  then browse to the folder where the tm1s.cfg file are in our example that is in c:\program files\ibm\cognos\tm1_64\samples\tm1\cxmd.

Save and start the CXMD instance from Configuration program.

 

Start TM1 architect on the Server to see if you can access the CXMD application.

 

To get TM1 perspective to work after you have used Cognos Express the end user must do a few things;

Ensure the new Cognos BI/TM1 servers are in Internet Options local intranet zone.

Uninstall the previous Cognos Express client.

Install the new TM1 perspective from setup files you place on a share (\\TM1server\clientsetup$).

(select default options during install)

 

first run setup from

\\TM1server\clientsetup$\tm1_clt_10.2.2_32b_ml.tar\win32\iisetup.exe

 

second run setup from

\\TM1server\clientsetup$\up_tm1client_win32_10.2.5260.168_ml.tar\win32\iisetup.exe

 

Then copy all files from folder

\\TM1server\clientsetup$\NewSSLCerts\*.*

 

to this folders on your computer

C:\Program Files (x86)\ibm\cognos\tm1\bin\ssl\*.*

 

Inside Microsoft Excel 2010 add the new folder for TM1\bin to trusted locations.

Go to File – Options in Excel.

Click on Trust Center

Click on Trust Center Settings button

Click on Trusted Locations

Click on Add new location button

Browse to the folder for TM1 that is c:\program files (x86)\ibm\cognos\tm1\bin

Click OK all the way out of Microsoft Excel

Now it should work to start TM1 Perspective from icon on start menu.

 

Excel sheet you have published in TM1WEB, you may need to republish from TM1 Perspective again.

If you get the error message “STOP Failed to open the target workbook. Please make sure the file has not been renamed or deleted.”  when you open a xlsx file in Tm1web applications, then the solution is to create the xlsx-page in new Excel Workbook files and publish them again to the TM1WEB application. Hopefully you can copy the layout and code from the old xls file. The xls files previous used in Cognos Express can in many case not be working in the new Cognos TM1 10.2.2.

 

More Information:

http://www.ibm.com/support/knowledgecenter/SSMR4U_10.2.2/com.ibm.swg.ba.cognos.express_migration.10.2.2.doc/t_express_inst_mig_migrate_tm1_migrate_cxmd.html

To test and see error better set it up like this

https://tm1help.wordpress.com/2011/06/19/how-to-set-up-a-new-tm1-model/

Ensure that you have uninstall Cognos Express before you install TM1 otherwise this can help

http://www-01.ibm.com/support/docview.wss?uid=swg21635821

To active sso in Cognos BI do this steps

http://www.ibm.com/support/knowledgecenter/SSEP7J_10.2.2/com.ibm.swg.ba.cognos.c8pp_inst.10.2.2.doc/t_stp_sso_active_drctry_remote_user.html

Product:
Cognos TM1 10.2.2
Windows Server 2008 R2 64 bit

Problem:
After change to use DNS alias to surf to the Cognos servers there is an error message after you try to login that says;
The TM1Web service parameter was not specified or is not one of the configured locations
You can login if you enter the TM1 server direct like this;
http://servername.domain.com:9510/tm1web/

Possible solution:
You need to update the TM1WEB.HTML file with the DNS alias.
Open the TM1WEB.HTML file from your Cognos BI gateway server in folder
C:\Program Files\ibm\cognos\c10_64\webcontent\tm1\web\tm1web.html

Update the value below by adding the DNS alias for the TM1 server.
// Update the following to point to the location of the TM1Web service(s)
var tm1webServices = [“http://servername.domain.com:9510″,”http://dnsalias.domain.com:9510”];

Save the file, and start Internet Explorer to test again.

Product:
IBM Cognos TM1 10.2 server (version 10.2.5000.367-0)
IBM Cognos TM1 package connector (version 10.2.5000.14-0)
IBM Cognos BI 10.2.1 Fix Pack 1 (version 10.2.5001.156-0)
IBM Cognos BI 10.2.1 Fix Pack 2 (version 10.2.5002.78-0)
Windows 2008 R2 server

Symptom:
After installation of TM1 Package Connector (tm1pc_10.1.1_bi_10.2.1_win_ml.tar) on the same computer where you have TM1 Architect and Framework Manager installed, the option inside TI Turbo Integrator dialog for “IBM Cognos Package” is greyed out and not select-able.

You only get this issue on the Developer computer where you have also installed frame work manager for Cognos BI 10.2.1 fix pack 1.
If there is only TM1 installed or there is not a Cognos BI fix pack installed, it will work.

Solution:
Uninstall TM1 package connector from your computer.
Leave the Framework Manager and other software still installed.
Run installation of TM1 Package Connector again, but
Select a new folder, like:
C:\program files (x86)\ibm\cognos\c10pack
And also remember to set a new shortcut folder name to “IBM Cognos 10 Package Connector”
Finish the installation.
Then go to start menu and open Cognos configuration from “IBM Cognos 10 Package Connector”.
Update the environment tab with values for you Cognos Gateway server;
http://BIgatewayname.domain.com:80/ibmcognos/cgi-bin/cognosisapi.dll
And for you Dispatcher URI for external applications set it to;
http://BIservername.domain.com:9300/p2pd/servlet/dispatch
Save the settings.
Exit Cognos Configuration.
Start TM1 Architect
Click on a TM1 application to login.
Inside a TM1 application right click on “processes” and select “create new process”
Try to click on “IBM Cognos Package” – if it works, then you have succeeded.

TM1 architect use the windows variable TM1_PACKAGE_CONNECTOR to find the installation files its needs, so this variable should be a system variable. You can type SET in the command prompt on the server to check its current value, it should be
TM1_PACKAGE_CONNECTOR=c:\program files (x86)\ibm\cognos\c10pack\bin

You need to replace the URL/PATHS with the correct values for your servers.

Note: This will only work with 32 bit version of TM1 Architect.

And you must REBOOT the server after installation of the Package Connector.

Product:
Cognos TM1 10.2 64 bit
Cognos TM1 Architect 10.2 32 bit
Cognos TM1 package connector 10.1.1 32 bit
Microsoft Windows 2008 R2 server 64 bit
Oracle database server

Symptom:
Error when connecting from TM1 Architect to Oracle source through Cognos BI via TM1 Package Connector.
You have installed TM1 Package Connector on your TM1 server, and on your Terminal Server where you have installed TM1 Architect and Cognos Framework Manager.

You get a Data Source Sign on when you inside TM1 Architect are trying to Query the data with the IBM Cognos Package. This is because the client computer where TM1 Architect are trying to connect direct to the Oracle data source. You need to install Oracle 32 bit Drivers on the computer where TM1 Architect are installed. Also you need to update the tnsnames.ora file with the values needed for the database you try to connect to.

Error Message:
Error: MetaData procedure line (0): CCognosPackage::BuildDataSource Exception: (TR0324) Invalid logon.
– QE-DEF-0285 The logon failed.
– QE-DEF-0325 The logon failed for the following reason:
– RQP-DEF-0068 Unable to connect to at least one database during a multi-database attach to 1 database(s) in:
– CNSDW

– UDA-SQL-0432 Unable to locate the gateway “cogudaor”.
or
Error: MetaData procedure line (0): CCognosPackage::BuildDataSource Exception: (TR0324) Invalid logon.
– QE-DEF-0285 The logon failed.
– QE-DEF-0323 The DSN(ODBC)/ServiceName is invalid. Either the DSN is missing or the host is inaccessible.
– RQP-DEF-0068 Unable to connect to at least one database during a multi-database attach to 1 database(s) in:
– CNSDW

– UDA-SQL-0031 Unable to access the “CNSDW” database. Check that the connection parameters to the database are configured correctly. For example, ensure that the data source connection contains the signon information, such as a password, to connect to the database.
– UDA-SQL-0532 Data Source is not accessible: “data.test.domain.com”.
– ORA-12154: TNS:could not resolve the connect identifier specified

Solution:
Install the Oracle 32 bit drivers on the terminal server where TM1 architect and TM1 Package Connector are installed.
Update the tnsnames.ora file in folder \network\admin to include your data source.

Install the Oracle 32 bit drivers on the Windows server where TM1 Application and TM1 Package Connector are installed. This is the TM1 server where you have your TM1 data folder and you TM1 application.
Update the tnsnames.ora file in folder \network\admin to include your data source.

To get ODBC connections to work in TM1 Architect you need to also install the Oracle 64 bit drivers (in its own directory) on the Windows server where TM1 Application or TM1 Architect are installed. The ODBC connection is using the 64 bit parts of TM1 applications.
You need to start the ODBC Admin (odbcad32) and configure your odbc connection before start of TM1 Architect.

You must restart the TM1 application server, to make it be aware of your new installation of Oracle Drivers.

The Windows Path variable must include the path to the BIN folder of both the Oracle drivers installed.

More information:
Error:UDA-SQL-0432 Unable to locate the gateway “cogudaor”.
= missing 32 bit driver on TM1 server

Error: ORA-12154: TNS:could not resolve the connect identifier specified
= missing TNSNAMES.ORA file on the TM1 server

The TM1 server 64 bit version is using 32 bit drivers when access to data is made though the TM1 Package Connector (who is a 32 bit application). The TM1 architect also need direct connection to the Oracle datasource when developing, so you need 32 bit drivers on the TM1 Architect computer when using the TM1 package connector software.

The TM1 server 64 bit version is using 64 bit drivers when access to data is made through the ODBC connection on the server, here is the same on the terminal server where you have installed TM1 Architect. You must install the 64 bit database drivers on the TM1 servers and TM1 Architect clients.

Product:
Cognos TM1 10.2.2
Microsoft Windows 2008 R2

Problem:
How install TM1 clients to client computers at Enterprise Company?

Solution:
Only supported way to install Cognos Program is by the provide software, manually or scripted. Cognos support is not valid if you create your own installation package.
You can run a silent installation of Cognos programs by supplying an ATS text file that contain the result from a previous installation.
On a workstation at the company, run the installation of your Cognos Client manually answering all questions, for example about folder to install to.
After installation there is an ATS file in folder C:\Program Files (x86)\ibm\cognos\c10\instlog. Copy that ATS file and the Cognos media to a separate folder on a share.
Open the ATS file and change the License from NO to YES, like this:
[Dialog2]
Title=IBM License Agreement
;Failure to accept the license agreement and non-IBM terms, if any, will abort the installation.
;Please return the software to the point of acquisition and obtain a refund, if applicable.
I Agree=y
[Dialog3]
Title=Non IBM License Agreement
;Failure to accept the license agreement and non-IBM terms, if any, will abort the installation.
;Please return the software to the point of acquisition and obtain a refund, if applicable.
I Agree=y
Save the ATS file.
To make the installation, create an install.cmd file. Create a folder c:\install on the client computer. Under the c:\install create a folder called media. Copy the ATS file and a install.cmd file to a folder called c:\install\media on your computer.
Then copy the media for the client you want install to a suitable folder, example c:\install\media\tm1_10.2.2\ga\tm1_clt_10.2.2_32b_ml. Create separate folders for each client software.
The name of the ATS file tell the version that is installed, you can change the name.
cd /D %~dp0 move the focus in windows to the current folder.
Place any extra needed files in the c:\install\media folder as listed below;

TM1 Architect
The install.cmd should contain this:
@echo off
cd /D %~dp0
call .\tm1_10.2.2\ga\tm1_clt_10.2.2_32b_ml\win32\issetup.exe -s 01-TM1CLIENT-10.2-5200.235.ats
copy /Y /V msmask32.ocx “C:\Windows\SysWOW64\”
regsvr32 /s C:\Windows\SysWOW64\msmask32.ocx
==========
The file msmask32.ocx is sometimes not there; therefore add it in the script.

TM1 Perspective
The install.cmd should contain this:
@echo off
cd /D %~dp0
call .\tm1_10.2.2\ga\tm1_clt_10.2.2_32b_ml\win32\issetup.exe -s 01-TM1CLIENT-10.2-5200.235.ats
regsvr32 /s /u C:\Windows\SysWOW64\mscomctl.ocx
regsvr32 /s C:\Windows\SysWOW64\mscomctl.ocx
===========
The file mscomctl.ocx is sometimes not registered, so we unregister it and register it again.
TM1 Performance Modeller
The install.cmd should contain this:
@echo off
cd /D %~dp0
call .\tm1_10.2.2\PerformanceModeler64.msi ALLUSERS=1 TARGETDIR=”C:\Program Files” NOUPDATE=Yes
==========
TM1 client media is found on the TM1 server you have installed in folder C:\Program Files\ibm\cognos\tm1_64\webapps\pmpsvc\rcp_installs, copy the MSI file to your folder c:\install\media\tm1_10.2.2\.
TM1 Cognos Insight
The install.cmd should contain this:
@echo off
cd /D %~dp0
call .\tm1_10.2.2\CognosInsight64.msi ALLUSERS=1 TARGETDIR=”C:\Program Files” NOUPDATE=Yes
==========
TM1 client media is found on the TM1 server you have installed in folder C:\Program Files\ibm\cognos\tm1_64\webapps\pmpsvc\rcp_installs, copy the MSI file to your folder c:\install\media\tm1_10.2.2\.
TM1 10.2.0 Package Connector
The install.cmd should contain this:
@echo off
cd /D %~dp0
call .\bi_10.2.1\ga\tm1pc_10.1.1_bi_10.2.1_win_ml\win32\issetup.exe -s 01-TM1PKGCTOR-10.2-5000.14.ats
==========
The Package connector is needed on both Tm1 server and the client using TM1 architect, if you need to import data thru Cognos BI framework manager package.
CAFE 10.2.2
The install.cmd should contain this:
@echo off
cd /D %~dp0
call .\anl_ms_xls_32b_10.2.2_win_ml\win32\issetup.exe -s 02-COR-10.2-5200.150.ats
==========
You can in Cognos Configuration on the TM1 server, turn off that Cognos Insight is automatic installed to clients from TM1 Application Web when they click on the icon.
Go to environment – TM1 application server – TM1 Clients – Allow provision installs – set to False.
TM1 Application Web (contributor) or TM1 Operations Console does not need a client installation.
You surf from client Internet Explorer to http://tm1server:9510/tm1web
You also need to install any database drivers e.g. oracle, at the client that run TM1 Architect.
More information:
http://www-01.ibm.com/support/knowledgecenter/?lang=en#!/SS9RXT_10.2.2/com.ibm.swg.ba.cognos.tm1_inst.10.2.2.doc/t_tm1_inst_settingupanunattendedinstallationandconfiguration.html

Product:
IBM Cognos TM1 10.1.1
Microsoft Windows 2008 R2 server

Problem:
How do I create a system cube, where I can store common values ( like file paths, database logins) and other things that can change when I move my TM1 application between Cognos Servers.

Solution:
Log into TM1 Architect
Create first a dimension Sys.Environment variables, like this:
Right click on dimensions and select “create new dimension”
Right click and select “insert element”
Enter “fileshare_to_TM1”
Select “string” for Element type.
Click Add.
Enter “ODBC connection”
Select “string” for Element type.
Click Add.
Click OK
Click OK in the top right of the dialog.
Enter the name Sys.Environment variables.
Click OK

Right click on dimensions and select “create new dimension”
Right click and select “insert element”
Enter Value
Select “string” for Element type.
Click Add.
Enter Number
Select “simple” for Element type.
Click Add.
Click OK
Click OK in the top right of the dialog.
Enter the name Sys.Measures
Click OK

Right click on cubes and select “create new cube”
Enter cube name: Sys.Settings
Move the two dimensions to the right side column by mark sys.measures and sys.environment variables and click on the arrow button to move them over.
Click create cube.

Now you can use this for your application.
Double click on the cube Sys.Settings to get into Cube Viewer.
Click on Recalculate icon to show content.
Under the value column for the row of fileshare_to_tm1 enter the path your application will use to get csv files to import, in format \\servername\sharename\foldername , e.g. \\srv001\common\budgetimport.

In the same manner can you enter the name of the ODBC connection you are going to use in the Microsoft Windows server where TM1 is installed, e.g. DATA42 ( if you have named your ODBC connection to that).
To create a ODBC connection you start program c:\windows\system32\odbcad32.exe.

This value can you then use in your TI process code.
In your PROLOG tab you enter;
ODBC_Connection = cellgets (‘sys.settings’,’ODBC Connection’, ‘Value’);
This will populate variable ODBC_Connection with the value DATA42 that you have stored in the cube.
So when you set the source for the data source programmatically in your prolog tab with the value DataSourceNameForClient=ODBC_Connection; The “Data Source Name” will be DATA42.
If you move your TM1 application to some other TM1 server, then the TM1 administrator easy can update the Sys.Settings cube only. And then does not need to search your TI process code for references to the ODBC connection.

In similar manner you can get the path to your code by in PROLOG tab enter code like this;
sPath = cellgets(‘sys.settings’,’fileshare_to_tm1′,’value’);
This will set the variable sPath with the share you need, so when you need it you can use it in cases like;

DataSourceNameForServer= sFilePath;
or
Asciioutput ( sPath | ‘\’ | sFilename, vA_Value, vB_Value);

The best is if the sFilename also come from a stored value in Sys.Settings.
Right click on dimension Sys.Environments variables and select Edit Dimension Structure to get into Subset Editor.
Right click and select Insert Element
Enter “Filename”
Select “string” as element type
Click Add
Click OK
Click OK to close the Dimension Editor
One question about saving changes to dimension you select Yes.

Double click on the cube Sys.Settings to get into Cube Viewer.
Click on Recalculate icon to show content.
At Filename you under Value enter the name of the csv file you want to import, can be SapExport.csv.
Now use this code to get the value;
sFilename = cellgets (‘sys.settings’,’Filename’, ‘Value’);
Then you can create the sFilePath with this code;
sFilePath = sPath | ‘\’ | sFilename;

This will add value of sPath together with value of sFilename with a \ in-between.
The value of sFilePath will then in our example be \\srv001\common\budgetimport\SapExport.csv.

By using this technique for any environment value, like paths or database connections, it is easy to support the application when moved between DEV or PROD environments.

Product:

Cognos TM1 10.1.1 (version in cmplst.txt file is RTM-10.1.7000.91-0)

Update TM1 version is RTM-10.1.7101.108-0

Windows 2008 R2 Datacenter server, Service Pack 1

Problem:

Get the last day in each month to a value. You have in a dimension data, that only contain year and month, but you need to export it as year-month-day. And you want to have the day to be the last day in the each month. How do you find the last day in a month?

Solution:

You have a dimension called S2.PeriodMonthly that contains the hierarchies of the year – quarters – months.  Below the structure of the Dimension.

2011
2011Q1
201101
201102
201103
2011Q2
201104
201105
201106

 

Add to this is an alias called S2.Name where we want the information to be in this format

 

2011
2011Q1
2011-01-31
2011-02-28
2011-03-30

 

Select Display Control Objects from the VIEW menu in TM1 Architect.

Open the control cube for }ElementsAttributes_S2.PeriodMonthly and right click and select edit rule.

Enter below code text to create the rule, which will update the Alias with the Correct Day in the month for the values entered into the dimension.  This rule is automatic processed when values are entered into the dimension.

 

#———————————————————————————

#   RULE 1

#   Set the last day in the month

#———————————————————————————

 

[‘S2.Name’] = s:

if( ellev(‘S2.PeriodMonthly’,!S2.PeriodMonthly) = 0,

#——-   31 DAYS —————————#

if(

subst(!S2.PeriodMonthly,5,2)@=’01’ %

subst(!S2.PeriodMonthly,5,2)@=’03’ %

subst(!S2.PeriodMonthly,5,2)@=’05’ %

subst(!S2.PeriodMonthly,5,2)@=’07’ %

subst(!S2.PeriodMonthly,5,2)@=’08’ %

subst(!S2.PeriodMonthly,5,2)@=’10’ %

subst(!S2.PeriodMonthly,5,2)@=’12’,

subst(!S2.PeriodMonthly,1,4)|’-‘|subst(!S2.PeriodMonthly,5,2) |’-31′,

#——-   30 DAYS —————————#

if(

subst(!S2.PeriodMonthly,5,2)@=’04’ %

subst(!S2.PeriodMonthly,5,2)@=’06’ %

subst(!S2.PeriodMonthly,5,2)@=’09’ %

subst(!S2.PeriodMonthly,5,2)@=’11’,

subst(!S2.PeriodMonthly,1,4)|’-‘|subst(!S2.PeriodMonthly,5,2) |’-30′,

#——-   28-29 DAYS —————————#

if(subst(!S2.PeriodMonthly,5,2)@=’02’,

if( mod (numbr(subst(!S2.PeriodMonthly,1,4)),4)=0,

subst(!S2.PeriodMonthly,1,4)|’-‘|subst(!S2.PeriodMonthly,5,2) |’-29′,

subst(!S2.PeriodMonthly,1,4)|’-‘|subst(!S2.PeriodMonthly,5,2) |’-28′

),

STET

)

)

),

STET

)

[‘S2.Name’] = s:

if( ellev(‘S2.PeriodMonthly’,!S2.PeriodMonthly) = 0,

 

Above will set the alias S2.Name to have this new value only if it is the lowest dimension, and not a consolidated value. ELLEV returns the level of an element within a dimension.

If S2.PeriodMonthly have a value at the lowest level (=0) then it will do the coming commands.

#——-   31 DAYS —————————#

if(

subst(!S2.PeriodMonthly,5,2)@=’01’ %

 

Above will check if the value for dimension S2.PeriodMonthly has the letters 01 in the last part.

So it will check 201101 that the 2 characters with start of character 5 in the word are equal to string 01. In that case it will move to next step.

subst(!S2.PeriodMonthly,1,4)|’-‘|subst(!S2.PeriodMonthly,5,2) |’-31′,

Above will create the value 2011-01-31 for the alias S2.Name.

Subst takes value from dimension and from start position and then number of characters, so this subst(!S2.PeriodMonthly,1,4)| will give ‘2011’. The pipe sign is the add function to add the next string – in this case ‘-‘ that will give the result ‘2011-‘. The next subst(!S2.PeriodMonthly,5,2) will add the characters from position fifth and two characters, in our example that is ‘01’.

Then |’-31′ will add ‘-31’ to the end of the string value that we put inside S2.Alias.

#——-   28-29 DAYS —————————#

if(subst(!S2.PeriodMonthly,5,2)@=’02’,

if( mod (numbr(subst(!S2.PeriodMonthly,1,4)),4)=0,

subst(!S2.PeriodMonthly,1,4)|’-‘|subst(!S2.PeriodMonthly,5,2) |’-29′,

subst(!S2.PeriodMonthly,1,4)|’-‘|subst(!S2.PeriodMonthly,5,2) |’-28′

 

Above part will check if the year is a leap year, by function mod 4 that will give every forth year.
MOD returns the remainder of dividing a number by a divisor.

(This function will not work for the year 3000, but otherwise be correct.)

subst(!S2.PeriodMonthly,1,4)|’-‘|subst(!S2.PeriodMonthly,5,2) |’-29′,
subst(!S2.PeriodMonthly,1,4)|’-‘|subst(!S2.PeriodMonthly,5,2) |’-28′

In TM1 Rules, the else command is the comma, so in case it is a leap year we will set the value ‘29’ and if there is not a leap year ‘28’.

 

You can use it like this, test on a values lenght, and if to long replace it with this value.

 

v23 =  pPeriod;

if (long (v23) = 6);

v23 =  attrs ( ‘S2.PeriodMonthly’, v23, ‘S2.Name’) ;

endif;

Above place input parameter pPerid in variable v23, then we test if it is exact  6 characters long, and in that case we use the value for  S2.PeriodMonthly alias S2.Name when the v23 variable match the dimension content in S2.PeriodMonthly.  ATTRS returns a string attribute for a specified element of a dimension.  Gives that the v23 contain the value in S2.Name if the v23 is exact 6 characters long.

Product:
Cognos TM1 10.1.1
Windows 2008 R2 server

Problem:
How can I to simple log, when process have been run. Best into a cube, as a status log?

Solution:
Log into TM1 Architect
Create first a dimension SYS.EVENTS
Right click on dimensions and select “create new dimension”
Right click and select “insert element”
Enter 1
Select “string” for Element type.
Click Add.
Click OK
Click OK in the top right of the dialog.
Enter the name Sys.Events.

Right click on dimensions and select “create new dimension”
Right click and select “insert element”
Enter event
Select “string” for Element type.
Click Add.
Enter time
Select “string” for Element type.
Click Add.
Enter type
Select “string” for Element type.
Click Add.
Click OK
Click OK in the top right of the dialog.
Enter the name Sys.Log

Right click on cubes and select “create new cube”
Enter cube name: Sys.Log
Move the two dimensions to the right side column by mark sys.log and sys.events and click on the arrow button to move them over.
Click create cube.

Now you have created a cube to store the values from the logging.
Then in each process you have in your application, you add this lines to get a logging going for when the process was run.

In the PROLOG tab enter this line of code last;
#—————————————————————————
# Logging
#—————————————————————————
currentEvent = dimnm(‘sys.events’,dimsiz(‘sys.events’));
currentEvent = numbertoString(stringToNumber(currentEvent)+1);
DimensionElementInsert(‘sys.events’, ”, currentEvent,’N’);

Above code will update the sys.events dimension with one value, so it is ready to accept more values.

In the EPILOG tab enter this lines of code last, update the text with valid text describing the process that have happened.

#—————————————————————————
# Logging
#—————————————————————————
cellputs(‘Moved data for =’|pCompany |’ ‘ |pPeriod, ‘Sys.Log’,currentEvent, ‘event’);
cellputs(timSt(now, ‘\Y-\m-\d \h:\i’), ‘Sys.Log’,currentEvent, ‘time’);
cellputs(‘Name of the process that was run’,’Sys.Log’,currentEvent, ‘type’);

Replace the italic text with your function for that process, this is the text that is stored in the sys.log cube.

‘| is concatenation and will bring text ‘ ‘ together with the value of the variable pCompany.
So it will in the log show Moved data for= Office1 201401, in the case pCompany contains the value Office1.
timSt(now, ‘\Y-\m-\d \h:\i’) will give you the date and time in format YYYY-MM-DD HH:MM.
You need to ensure that all parameters you use are in STRING format when they are called here;
cellputs(‘Moved data for =’|pCompany |’ ‘ |pPeriod, ‘Sys.Log’,currentEvent, ‘event’);
Cellputs function sends a string value to a cube cell. Use the format;
Cellputs( ‘string to enter’, The name of the cube to which you want to send the string, Dimension element names that define the intersection of the cube to receive the string in our case the number, and the dimension name.)
DIMNM returns the element of a dimension that corresponds to the Index argument.
DIMSIZ returns the number of elements within a specified dimension.
Will give that dimnm(‘sys.events’,dimsiz(‘sys.events’)); returns the last element in the dimension.
DimensionElementInsert function adds an element to a dimension.
You can use this function to add numeric, string, or consolidated elements. Note that you cannot use this function in the Data or Epilog procedures of a TurboIntegrator process.
DimensionElementInsert(‘sys.events’, ”, currentEvent,’N’);
will increase the dimension sys.events with one more row.
Save and run your process, then you will se that the Sys.Log cube is updated with valid information.

This can be used as a simple time stamp log for when processes have been run, and can be easy accessed by the end-user from a TM1 view.

Product:
Cognos TM1 10.2
Windows 2008 R2 Server

Symptom:
TM1 application web is slow and it is resolved by restarting the TM1 Application service (tomcat).

Possible Solution:
1) In IBM Cognos Configuration of TM1, select Environment >TM1 Application Server, and increase “Maximum Memory in MB” from 768 to 1024 or 1536. The maximum that it can be set from this GUI is 4096 (in version 10.1x) – if set that high, be sure that the server has enough memory available to accommodate it. Restart the TM1 Application Server.

NOTE: In versions 10.2x the memory can be set higher than 4096 through the Cognos Configuration GUI – but, again, make sure there is enough RAM on the machine to accommodate it.

2) Launch the Apache Tomcat manager GUI from the cmd line (run the command prompt by using Run as Administrator) and navigate to the install directory for TM1 and the Tomcat bin folder (eg: C:\Program Files\ibm\cognos\tm1_64\tomcat\bin).
Type this:
tomcat6w.exe //ES//pmpsvc
Navigate to the Java tab, and in the Java Options window, navigate to the bottom of the options list and add in the following:
-Xgcpolicy:gencon
(the default garbage collector policy is “optthruput”)
Validate and close the window and restart TM1 Application Server.

Below is the list of default values for the TM1 Tomcat java:
-Dcatalina.base=C:\Program Files\ibm\cognos\tm1_64\tomcat
-Dcatalina.home=C:\Program Files\ibm\cognos\tm1_64\tomcat
-Djava.endorsed.dirs=C:\Program Files\ibm\cognos\tm1_64\tomcat\common\endorsed
-Djava.io.tmpdir=C:\Program Files\ibm\cognos\tm1_64\tomcat\temp
-Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true
-Xmx768m
-XX:MaxNewSize=384m
-XX:NewSize=192m
-XX:MaxPermSize=128m
-Dcom.sun.management.jmxremote.port=7999
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=true
-Dcom.sun.management.jmxremote.password=false
-Djmx.remote.x.server.connection.timeout=1000

NOTE: If you set the properties using the Apache Tomcat administration tab, start the TM1 Application Server using the Component Services option–do not use Cognos Configuration in that case as Cognos Configuration then resets the properties back to the shipped defaults.

3) If the server is a Virtual Machine (VMWare, ESXi) then go to Windows Control Panel, System and Security, Power Options, and change the power plan from “Balanced” to “High performance”.

4) Add exclusions to the antivirus to prevent “C:\Program Files\ibm\cognos\tm1_64\tomcat” and “C:\Program Files\ibm\cognos\tm1_64\webapps” from being scanned. Skipping scanning of all TM1 files is preferred – see below link.

5) Verify DEP is set to “Essential Windows programs and services only”. To do this : Right-click the”Computer” icon on your desktop, select “Properties”, select “Advanced System Settings”, select “Advanced” tab, under “Performances”, “Settings” button, “Data Execution Prevention” tab.

More Information
http://www-01.ibm.com/support/docview.wss?uid=swg21669247
http://www-01.ibm.com/support/docview.wss?uid=swg21454290

Product:
Cognos TM1 10.2.2
Microsoft Windows 2008 R2 server

Problem:
When users surf to TM1 Application Web and login they do not see the icons needed to start Performance Modeller nor do administration work. If some other user surf and login they see the icons needed.
http://tm1applicationservername.domain.com:9510/pmpsvc/
Possible Solution:
The user is not ADMIN in the published TM1 applications in TM1 application web.
When you login to TM1 application Web at address http://servername.domain.com:9510/pmpsvc/applications.jsp, you are assumed to be Administrator and also be administration inside the TM1 applications connected to the portal.
Normal end users that report values to TM1 applications should start the TM1 Application Web client from clicking on the link in Cognos Connection under IBM Cognos TM1 Application – My Applications folder.
Solve by make the Planning Sample a CAM used application.
Stop Planning Sample service.
Change to IntegratedSecurityMode=2 in C:\Program Files\ibm\cognos\tm1_64\samples\tm1\PlanSamp\TM1S.CFG file
Add the values that point to your BI servers in your TM1S.CFG file.
# CAMURI parameters have to be set to correct BI environment
ServerCAMURI=http://BIdispatcherservername.domain.com:9300/p2pd/servlet/dispatch
ClientCAMURI=http://BIgatewayservername.domain.com/ibmcognos/cgi-bin/cognosisapi.dll
ClientPingCAMPassport=900
Save the file and start the Planning Sample service.
You also need to make some changes on the BI servers to get TM1 CAM to work.
http://public.dhe.ibm.com/software/data/cognos/documentation/docs/en/10.2.2/tm1_inst.pdf

Added all TM1 developers, for all existing and new TM1 applications, to the Planning Sample application.
First update the C:\Users\%username%\AppData\Roaming\Applix\TM1\TM1P.INI file with the value to the BI servers.
AdvancedRulesEditor = T
AllowImportCAMClients = T
CognosGatewayURI = http://BIgatewayservername.domain.com/ibmcognos/cgi-bin/cognosisapi.dll
Save the file.
Start TM1 Architect and click on Planning sample to login as Admin.
Right click on planning sample and select security – clients/groups.
Click on Clients – add new clients.
You should get the Cognos Connection security page up so you can search your AD/LDAP domain for the users you want to add.
Click on your Active Directory folder.
Click on search in top right corner.
Enter the name of the user (this must be correct spelled)
Select Find text in Name and Description field.
Click search.
Mark the user and click arrow to add the users.
Click OK.
The users are added last in the Clients/groups on planning sample dialog.
Mark the user as ADMIN with a X in the column for ADMIN.
Click OK.
Select save data from menu and exit TM1 Architect.
Now you need to stop the TM1 service for Planning sample.
Change the TM1S.CFG file to IntegratedSecurityMode=5
Start the TM1 service for Planning sample.
Add planning sample to the IBM Cognos TM1 Applications site.
Add these values to TM1S.CFG file to make it work good in TM1 applications web;
DistributedPlanningOutputDir=tunit
PersistentFeeders=T
ForceReevaluationOfFeedersForFedCellsOnDataChange=T
AllowSeparateNandCRules = T
ParallelInteraction=T
ProportionSpreadToZeroCells=T
AllRuleCalcStargateOptimization=T
Surf to http://tm1servername.domain.com:9510/pmpsvc
Login as a person who already is administrator in TM1 applications there.
Click on the icon far to the right, Administer IBM Cognos TM1 Applications.
In the new page, under Server Names: click ADD
Enter the name of the TM1 host server as admin host.
Select Planning Sample from the drop down list and click OK.
Exit Internet Explorer.
Surf to applications web, click on the icon for performance modeller and now you should be able to select Planning Sample in the dropdown menu when performance modeller starts.

Then next time a user logins – he is an administrator in planning sample application and can start to create the IBM Cognos TM1 Applications for Web.