Cognos TM1 contributor client

How to script installation of Cognos TM1 Contributor client

System administrators can install the TM1 Contributor Administration tool using a Windows Installer command line. This also allows the Administration tool and framework to be distributed using Active Directory or other software management tools.

Use the command line to install the following MSI files:
•CognosRCP.msi – Installs the IBM Cognos Rich Client Framework.
•ModelingADT.msi – Installs the IBM Cognos TM1 Contributor Administration tool. This installation does not require any command line parameters.

MSI File Location
The required MSI files are initially contained in the pmpsvc.war file and get extracted when the TM1 Contributor Web application is deployed on the Web server.

After deployment on the Web server, the extracted MSI files are located in the rcp_installs sub-folder under the TM1 Contributor location on the Web server:

Web server program files\TM1 Contributor files\rcp_installs

For example, the typical location for the MSI files on Apache Tomcat is:
C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\pmpsvc\rcp_installsCommand Line Options

The commands that administrators can use to install CognosRCP.msi are described in the following list.

ALLUSERS=2 Installs the MSI for all TM1 Contributor users.

This command ensures that the registry entries for the IBM Cognos Rich Client Framework are located in HKEY_LOCAL_MACHINE.

Note: You must use this command with the TARGETDIR command.

TARGETDIR=”CognosRCP_install_location” Specifies the install location for the MSI. For example, TARGETDIR=”C:\Program Files”

NOUPDATE=Yes Prevents TM1 Contributor users from receiving automatic updates for the IBM Cognos Rich Client Framework.

Steps to Install the IBM Cognos Rich Client Framework

1.Open a command prompt, and navigate to the location of the CognosRCP.msi file.

By default, the MSI files are located in the following sub-folder on the Web server:

Web server program files\TM1 Contributor files\rcp_installs

2.Install CognosRCP.msi by doing one of the following:

To install the MSI for a single user, type the following command

CognosRCP.msi TARGETDIR=”install_location” Note: To prevent automatic updates for TM1 Contributor users add NOUPDATE=Yes before you execute the command.

To install the MSI for all users, type the following command

CognosRCP.msi TARGETDIR=”install_location” ALLUSERS=2

Note: To prevent automatic updates for TM1 Contributor users add NOUPDATE=Yes before you execute the command.

After you install the CognosRCP.msi, IBM Cognos Rich Client Framework appears on the Windows Add or Remove Programs list. In addition, a folder called CognosRCP is created in the installation location that you specified in the TARGETDIR command.

More Information:

Cognos Tm1 version 9.5.2
Cognos BI version 10.1

When user try to surf to TM1 contributor website get following error message:
The planning service parameter was not specified or is not one of the configured locations

Installed on 3 Microsoft Windows 2008 R2 servers with Cognos BI 10.1 64 bit report services on one server and the Cognos BI 10.1 32 bit Gateway functions on a separate server and Cognos TM1 9.5.2 on another server.

The following steps are done:

A TM1 application is created and setup with IntegratedSecurityMode=5 in the tm1s.cfg file
(This give that we use the Cognos BI authentication manager (CAM) for the TM1 application)
TM1 contributor is setup in an own TOMCAT instance (in folder D:\tomcat6).
TM1 portlet are installed the Cognos BI report server.
Installation of portlets will create the variables_tm1.xml in folder d:\Program Files\ibm\cognos\c10_64\templates\ps\portal on the Cognos BI server.
The file variables_tm1.xml is updated with the URL to the TM1 server as shown below



<url is-regex=”true”>http://srv001/TM1Web/TM1WebLogin.aspx</url>

<url is-regex=”true”>http://srv001/TM1Web/TM1WebLoginHandler.aspx</url>

<url is-regex=”true”>http://srv001/TM1Web/TM1WebMain.aspx</url>

<url is-regex=”true”></url>

<url is-regex=”true”></url>

<url is-regex=”true”></url>



<param name=”cam_passport”/>



Any extra and should be removed from the sample file, and then the file is saved without the sample extension, to be named variables_TM1.xml

The variables_plan.xml file is copied untouch from folder D:\Program Files\Cognos\TM1\Cadmin\gateway on TM1 server to folder D:\Program Files\ibm\cognos\c10_64\templates\ps\portal on the Cognos BI report server.

The planning.html file is copied from folder D:\Program Files\Cognos\TM1\Cadmin\gateway on the TM1 server to folder d:\Program Files (x86)\ibm\cognos\c10\webcontent\ on the Cognos BI gateway server.

The icon_active_application.gif file is copied from the D:\Program Files\Cognos\TM1\Cadmin\gateway folder on the TM1 server to the
D:\Program Files (x86)\ibm\cognos\c10\webcontent\ps\portal\images folder on the Cognos BI gateway server.

This is the icon for the published TM1 Contributor application in Cognos Connection folder “IBM Cognos TM1 Contributor Applications”.

Open the planning.html file in notepad from folder C:\Program Files (x86)\ibm\cognos\c10\webcontent on the Cognos BI gateway server.

Change line
// Update the following to point to the location of the planning service(s)
var planningServices = [“http://localhost:8080”];
var planningServices = [“”];

So you use the FQDN that is for the TM1 server where you have installed Tomcat and TM1 Contributor.
Save file and test again.

A not supported workaround is to change the planning.html to an older version.
If you have Cognos TM1 version 9.5.1 – you can copy that planning.html file from the D:\Program Files\Cognos\TM1\Cadmin\gateway folder – to the new installed Cognos BI server, and replace the planning.html file.
Then you use the not so secure planning.html file that was part of Cognos TM1 version 9.5.1.

This should you not do – it is not supported by Cognos.

Cognos TM1 version 9.5.1

This is a few old recommended actions to do at all Cognos TM1 installations.

1) Same folder structure in test and productions servers:
Recommended that you on the TM1 server create a folder named: tm1servers
Below that folder create a folder for each TM1 server you want to create;
• C:\tm1servers\tm1planning
• C:\tm1servers\tm1controller

By keeping the folder structure same on all TM1 servers it is easy to move scripts between the servers.

2) Create a separate folder for log files:
Below your TM1 folder for you custom TM1 server create a log folder named: LogFiles
Updatera din tm1s.cfg file med raden;

3) Create a separate folder for data files:
Below your TM1 folder for you custom TM1 server create a log folder named: DataFiles
Updatera din tm1s.cfg file med raden;

To the data folder you should also create a copy of the tm1s.cfg file and place there as “copy of tm1s.cfg” file.

4) Create a script that saves the TM1 data to disc every day:

Go into TM1 Architect program as administrator.
Expand the TM1 application and go to processes tab.
Right click and select “create new process”
Go to the Advance tab
Go to the Prolog tab
Enter a blank row
Enter the statement
Enter a blank row

Should look like this in prolog:
#****Begin: Generated Statements***
#****End: Generated Statements****

Click on the SAVE icon and name the solution to be SAVEDATA
Go to the Schedule tab
Click in “Schedule this Process as a Chore Named:”
Enter the name SAVEDATA
Enter 1 for run every 1 Days.
Check the local time to show 23:00:00
(this will make it to run every night)
Click on the SAVE icon

Select FILE – EXIT in Turbo Integrator to get back to TM1 Architect.
Then you should now have a process named SAVEDATA
And that chores named SAVEDATA.
Best to also create a TI process that copy the data folder to a different location as a backup.

5) Change the timeout for the TM1web:
On the TM1 server with IIS 6 from Windows 2003
Go to folder C:\Inetpub\wwwroot\TM1Web
Open web.config in notepad
Search for

Below system.web and before the line of <!—DYNAMIC DEBUG….. enter this line

Save and close the web.config file.
Restart the TM1 server and check that all is working.

TM1web version 9.5.1
Windows 2003 or 2008 x64 version

User attempts to export to PDF from TM1Web and receives an error.

Export in process, Please wait…
‘PDFcamp Printer’ was not installed properly

PDF camp Printer was not installed properly – it needs to be default printer for that windows account that runs the TM1 Excel Service.

Make sure that the PDFcamp Printer is set as default and then restart the TM1ExcelService, even if the printer was set as default.
If this does not resolve it, uninstall PDFCamp by using the 64-bit uninstaller executable at \bin\PDFcamp\unpdfxp64.exe
Then reinstall the PDFcamp Printer using the installer executable at \bin\PDFcamp\setupx64.exe.
Set the PDFcamp Printer as default and restart the TM1ExcelService again.

TM1 9.5.1 Contributor

Can not log into TM1 Contributor

When logging into TM1 Contributor with integrated CAM authentication, after putting in your credentials you receive the following error: PRS-PRH-0221 The Portal/variables_plan.xml could not be opened.

Two main reasons can be the source of this error:
1- The appropriate files have not been moved to the proper directory.
2- In a distributed environment, the files from the CAdmin folder in the TM1 installation directory are on the wrong server.

Resolving the problem
In a distributed Cognos environment where the Gateway and Application servers are on different machines:

1- Ensure that the pmpsvc.war file is on the C8\webapps folder on the Application servers.

2- Ensure that the planning.html, variables_plan.xml, and the icon_active_application.gif are in the C8\webcontent, C8\templates\ps\portal and C8\webcontent\ps\portal\images respectively on the Gateway server.

These files can be found under the TM1 install directory in the \Cadmin and \Cadmin\gateway folders.

If the gateway and dispatcher are on different servers, copy the variables_plan.xml to the dispatcher server.

3- Also, it is occasionally required that the CAMPortalVariableFile parameter in the tm1s.cfg file be changed from:

Restart the TM1 server to activate the change in parameters.

Cognos TM1 10.2.2
Microsoft Windows 2012 R2 server

The TI function SCAN does not find a match of data in a variable in the TI process.
After checking with ASCIIOUTPUT found that the word is with small letters and we search for capital letters.

The TM1 function SCAN is case sensitive.
Other functions that are case sensitive or space sensitive are;
TIMST are case sensitive. TIMST(366.0000, ‘\M \D, \Y’) returns ‘JAN 1, 1961’.
LONG and SUBST and Filter by Wildcard in subset editor is space sensitive.

Add UPPER to your question.

Change from
nLOB = SCAN (‘_LoB’ , vITEM);

More information:

Here are examples:
# Will return 4
l1 = Scan ( ‘def’, ‘abcdef’);

# Will return 0
l2 = Scan ( ‘def’, ‘ABCDEF’);

#Will return 0
l3 = Scan (‘def’, ‘a    b    c    d    e    f’);

# Will return Match
If ( ‘def’ @= ‘DEF’);
s1 = ‘Match’;
s1 = ‘No Match’;

# Will return Match
If ( ‘def’ @= ‘d e f ‘);
s2 = ‘Match’;
s2 = ‘No Match’;

AsciiOutput (‘F:\Temp\Outputs.txt’, NumberToString (l1), NumberToString (l2), NumberToString (l3), s1, s2 );

IBM Cognos TM1 10.2.2
Microsoft Excel 2010
Windows server 2008 R2 Standard

How install TM1 perspective and TM1 architect on Citrix server?

Possible solution:
Copy the setup media to an install folder on the Citrix server.
If you use 32 Bit Excel, then you should install 32 Bit Cognos TM1 Client programs.
Log on to the Citrix server as a local administrator.
Ensure that the prerequisite is installed, that is

  • Microsoft .NET Framework is needed for the Advanced Rules Editor and the publish to the Web feature in Cognos TM1 Architect and TM1 Perspectives.
  • Microsoft Visual C++ 2010 Redistributable Package (x86 and x64)

Both the x86 and x64 versions are required on a 64-bit Windows system if you plan to run any of the TM1 32-bit client applications such as Cognos TM1 Architect and TM1 Perspectives.

Turn off the UAC to make the installation easier.

Download the latest Cognos TM1 client fix pack
And place the media on the citrix c:\install folder.

Start a CMD prompt by right click and select “run as administrator”
Inside the CMD prompt change to the install folder
Then enter command “CHANGE USER /INSTALL”
Enter cd command to go to the win32 folder where you can in the CMD run the ISSETUP.EXE command.
Step through the installation selecting all the defaults.
This will only install TM1 Architect and TM1 Perspective.

After finish, change to the FIX PACK folder and run the ISSETUP.EXE for the TM1 fix pack to the same folder.
When this is done, you can start TM1 architect from the start menu and ensure that it works.
Close the TM1 architect program.

In the CMD prompt enter the command “CHANGE USER /EXECUTE”.
Now is the program installed.

You need to publish the following files in the Citrix portal for the users.

Publish TM1 architect as:
“C:\Program Files (x86)\IBM\cognos\tm1\bin\tm1a.exe”

Publish TM1 perspective as:
“C:\Program Files (x86)\IBM\cognos\tm1\bin\tm1p.xla”

Please note that each user must the first time they start Excel go into Options – Security center -Trusted folders and add the TM1 bin folder.

They must also inside TM1 Architect under menu Options enter the name of the Windows server where TM1 are, that they should connect to.

Then to get it to work better, you can do adjustments like this:

Due to a security issue in Excel 2007 and Excel 2010 you get an error about smart card when you start perspective.
Instead of publish the XLA file direct, create a BAT file with below content:


REM change trusted locations in excel

reg add “HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Excel\Security\Trusted Locations\Location6” /v Path /t REG_SZ /f /d “C:\Program Files (x86)\IBM\cognos\tm1\bin\

reg add “HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Excel\Security\Trusted Locations\Location6” /v AllowSubfolders /t REG_DWORD /d 1 /f

reg add “HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Excel\Security\Trusted Locations\Location6” /v Description /t REG_SZ /d  “For TM1” /f

reg add “HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Excel\Security\Trusted Locations\Location6” /v Date /t REG_SZ /d “2016-08-24 10:45” /f

REM start tm1 perspective and excel

“C:\Program Files (x86)\IBM\cognos\tm1\bin\tm1p.xla”


Save that file as EXCELFOLDER.BAT
Then publish to start the EXCELFOLDER.BAT instead in citrix.
This will set the TM1 folder to be trusted inside Excel for that user during startup, so TM1 perspective will work.
You need to change the value 14.0 if you do not use Excel version 2010.

The REG ADD in the BAT/CMD file will update a value in the registry for that user who run the script, that is the HKEY_CURRENT_USER, therefor the script need to run after the person have logged in to the Citrix session.


Other issue is to prepopulate the TM1P.INI file with data about the server
If the file does not exist it will be created from a master in the folder,


Update this tm1p.ini file with the following lines

AdvancedRulesEditor = T
CognosGatewayURI = http://ServerName.Domain.Se/ibmcognos/cgi-bin/cognosisapi.dll
AdminHost = ServerName.Domain.Se
IntegratedLogin = T


Otherwise a VBscript like this will update the TM1p.ini file

‘ Script to update the ini file

Const OpenAsDefault = -2  ‘ Opens the file using the system default
Const OpenAsUnicode = -1  ‘ Opens the file as Unicode
Const OpenAs__ASCII =  0  ‘ Opens the file as ASCII
Const ForReading = 1
Const ForWriting = 2
Const ForAppending=8

set objShell = CreateObject(“WScript.Shell”)
profile_path = objShell.ExpandEnvironmentStrings(“%APPDATA%”)
profile_app = profile_path & “\Applix\TM1\tm1p.ini”
‘ profile_app = “C:\Users\cognos\AppData\Roaming\Applix\TM1\tm1p.ini”
‘ msgbox  profile_app

Set objFSO = CreateObject(“Scripting.FileSystemObject”)
Set objTextFile = objFSO.OpenTextFile( profile_app , ForReading, false , OpenAsUnicode)

Do Until objTextFile.AtEndOfStream
strNextLine = objTextFile.Readline
intLineFinder = InStr(strNextLine, “AdvancedRulesEditor”)
If intLineFinder <> 0 Then
strNextLine = “AdvancedRulesEditor = T”
End If

intLineFinder = InStr(strNextLine, “AdminHost =”)
If intLineFinder <> 0 Then
strNextLine = “AdminHost = ServerName.Domain.Se”
End If

intLineFinder = InStr(strNextLine, “IntegratedLogin”)
If intLineFinder <> 0 Then
strNextLine = “IntegratedLogin = T”
End If

intLineFinder = InStr(strNextLine, “CognosGatewayURI”)
If intLineFinder <> 0 Then
strNextLine = “CognosGatewayURI = http://ServerName.Domain.Se/ibmcognos/cgi-bin/cognosisapi.dll”
End If

If objTextFile.AtEndOfStream <> True Then
strNewFile = strNewFile & strNextLine & vbNewLine
End If


Set objTextFile = objFSO.OpenTextFile( profile_app , ForWriting, true, OpenAsUnicode)
objTextFile.Write strNewFile

Save above script as a file c:\IBM\updateini.vbs

The create a new text file named c:\IBM\updateini.bat that contain this value:

wscript “c:\IBM\updateini.vbs”

This BAT file is then called from loginscript or from published Citrix icon for the TM1 architect.

Note that this line gets the path to the user current running the script, so here it will update that user profile
set objShell = CreateObject(“WScript.Shell”)
profile_path = objShell.ExpandEnvironmentStrings(“%APPDATA%”)

If you set below value wrong the result of the TM1P.INI file may be in Chines language
Set objTextFile = objFSO.OpenTextFile( profile_app , ForReading, false , OpenAsUnicode)

Below rows check if the line read at the moment contain the text IntegratedLogin and if it does then it will replace the whole line with the value IntegratedLogin = T.
intLineFinder = InStr(strNextLine, “IntegratedLogin”)
If intLineFinder <> 0 Then
strNextLine = “IntegratedLogin = T”
End If


More information can be found here


If the VBS script does not finish all the way, maybe the timeout have changed on the computer.

To change how long a VBS script can run, you can change it in registry at this point

[HKEY_CURRENT_USER\Software\Microsoft\Windows Script Host\Settings]
When you deleted “Timeout”, which had a value of 0x0000000f (15),
you can get the script back to run for a long time.

If the resulting file contains chines characters instead of the one you want then you have set the format in the opentextfile to a format you are not using in your windows computer.

See below for the possibles;

OpenTextFile Method

Opens a specified file and returns a TextStream object that can be used to read from, write to, or append to the file.


object.OpenTextFile(filename[, iomode[, create[, format]]])



Required. Object is always the name of a FileSystemObject.


Required. String expression that identifies the file to open.


Optional. Can be one of three constants: ForReading, ForWriting, or ForAppending.


Optional. Boolean value that indicates whether a new file can be created if the specified filename doesn’t exist. The value is True if a new file is created, False if it isn’t created. If omitted, a new file isn’t created.


Optional. One of three Tristate values used to indicate the format of the opened file (TristateTrue = -1 to open the file as Unicode, TristateFalse = 0 to open the file as ASCII, TristateUseDefault = -2 to open the file as the system default). If omitted, the file is opened as ASCII.



Cognos TM1 9.5

After installing a new TM1 instance – the new TM1 server is not shown in the drop down list for the TM1Web login. It only shows the login dialog for user name and password.

The web.config file in the tm1web folder is configured to only talk to one tm1server.

Open the web.config file from folder
Search the file for TM1ServerName (it is close to the end of the file)

Change the line from
<add key=”TM1ServerName” value=”tm1servername” />
to this
<add key=”TM1ServerName” value=”” />
save the file.

Then surf to the TM1web and select the server you want to login to from the list.

Cognos TM1 9.5.2 portlets
Cognos BI 10.1

You can not get a TM1 cube viewer to show up in your Cognos Connection Page.

Error message:
The file “portal/variables_TM1.xml” could not be opened.

The variables_tm1.xml file is installed to the Cognos Gateway folder, should be installed to folder C:\Program Files\ibm\cognos\c10_64\templates\ps\portal on the Cognos BI server.

Error message:
The forward URL does not exist or it has failed validation. Ensure that a valid forward URL is specified.

The URL in the variables_tm1.xml file is wrong. Ensure it is correct, by compare it to a variables_tm1.xml file from a working Cognos BI server.

Note that you must always restart the Cognos BI service, after changes to variables_tm1.xml file for the change to take affect.

The variables_TM1.xml file should look like this; replace SRV001 with your TM1 server name.

<?xml version=”1.0″ encoding=”UTF-8″?>


IBM Confidential

OCO Source Materials

BI and PM: tm1fragments

(C) Copyright IBM Corp. 2008, 2009

The source code for this program is not published or otherwise

divested of its trade secrets, irrespective of what has been

deposited with the U.S. Copyright Office.




<url is-regex=”true”>http://srv001/TM1Web/TM1WebLogin.aspx</url>

<url is-regex=”true”>http://srv001/TM1Web/TM1WebLoginHandler.aspx</url>

<url is-regex=”true”>http://srv001/TM1Web/TM1WebMain.aspx</url>



<param name=”cam_passport”/>



Cognos TM1 contributor version 9.5.1

Can not logon and access a previous working TM1 Contributor application.
User surf to http://tm1servername:8080/pmpsvc
Is prompted with TM1 Login dialog that ask for user name and password
No matter what you enter – you get a error message.

Error message:
Could not logon to any available servers with the provided credentials.

The TM1 Contributor is tie to a TM1 Application that use CAM security.
But the TM1 application was not using CAM security when you setup TOMCAT and TM1 Contributor – you have change the TM1 application later to use CAM (Cognos 8 logon) and therefore the TM1 Contributor ask for a TM1 login- but can not find any TM1 application that supports that logon method.

Suggested Solution:
(There may be other way to solve this)

You need to setup TM1 Contributor again.
Logon to your TM1 Contributor windows server.
Stop Apache Tomcat 6 service.
Remove the values for server name and admin_host in the pmpsvc_config.xml file.
Start the Apache Tomcat 6 service again.
Surf to http://localhost:8080/pmpsvc

You will be prompted with the TM1 Contributor Configuration page again.

Enter the TM1 server name at Admin Host:
(this can be a different server than the TM1WEB – it should be the server that runs the TM1 admin service)

The TM1 Web Client URL should be:
(this should point to the server that runs the tm1web portal – often the same server as the Cognos gateway server)

In the server drop down list you should select your previous selected tm1planning server.
Now you will get two new lines to enter information (for the CAM security)

IBM Cognos 8 Gateway URI: enter here a value like this;

IBM Cognos 8 Dispatcher URI: enter here a value like this;

Click OK to save.
Now you will be prompted with the Cognos 8 logon page.
Then you are back in the TM1 Contributor page with your application.