TM1 Datum Folder Changing

Post Reply
AmbPin
Regular Participant
Posts: 173
Joined: Sat Mar 20, 2010 3:03 pm
OLAP Product: TM1
Version: 9.5.2
Excel Version: 2007-10

TM1 Datum Folder Changing

Post by AmbPin »

I have encountered a strange problem recently, virtually all of our TI processes write custom logs to the log directory. Because we have set up all of our servers in the same way it had seemed safe (and because I hadn’t noticed the GetProcessErrorFileDirectory command) to call the AsciiOutput command using the following file path:-

..\Logs\LogFileName.txt

However this stopped working recently:-

• If we wrote to LogFileName.txt then this file was created in the DB folder as expected;
• If we wrote to .\LogFileName.txt then this file was created in the DB\ Scenario}subs folder which makes no sense at all;
• If we wrote to ..\LogFileName.txt then this file was not created and the process terminated with a file not found error;
• If we wrote to ..\..\LogFileName.txt then the file was created as expected in the log file folder;

I noticed that if we restart the TM1 server then normal behaviour was restored. It appears that the reason for the problem is that I have introduced a set of new TI processes that perform our data loading making use of parallel processing. The first of these creates a subset of offices with recent sales activity and shells a BAT file to call a TI process for each. This processes the data much faster as it makes use of more of the processing power of the machine and gives us more flexibility to load the data for individual offices. However once I have run one of these parallel processes I start seeing the behaviour described above which makes all of our existing processes fail.

Once one of these processes has run it seems that the DOS folder starting point for TM1 is shifted from DB to DB\ Scenario}subs in our case.
User avatar
qml
MVP
Posts: 1098
Joined: Mon Feb 01, 2010 1:01 pm
OLAP Product: TM1 / Planning Analytics
Version: 2.0.9 and all previous
Excel Version: 2007 - 2016
Location: London, UK, Europe

Re: TM1 Datum Folder Changing

Post by qml »

Have you tried changing the current directory using the cd dos command embedded in ExecuteCommand() to restore the active path to be your data folder?

Also, why don't you just use direct references to your paths? If you want to keep them portable between servers with different set up you could always store them outside of the TI code, e.g. in a cube.
Kamil Arendt
AmbPin
Regular Participant
Posts: 173
Joined: Sat Mar 20, 2010 3:03 pm
OLAP Product: TM1
Version: 9.5.2
Excel Version: 2007-10

Re: TM1 Datum Folder Changing

Post by AmbPin »

qml wrote:Have you tried changing the current directory using the cd dos command embedded in ExecuteCommand() to restore the active path to be your data folder?
If you mean to change the folder back to the DB then I did do this but it made no difference

Also, why don't you just use direct references to your paths? If you want to keep them portable between servers with different set up you could always store them outside of the TI code, e.g. in a cube.
I think it is better to use the GetProcessErrorFileDirectory commande

Why does it change though? It is all very well working around the problem once you know it is there but why should it change?
Post Reply