hustle.exe redirect output

Post Reply
holger_b
Posts: 131
Joined: Tue May 17, 2011 10:04 am
OLAP Product: TM1
Version: Planning Analytics 2.0
Excel Version: 2016
Location: Freiburg, Germany

hustle.exe redirect output

Post by holger_b »

Dear all,

since a few weeks we have been using hustle.exe with great success. However, I did not manage yet to redirect the output to a text file, can someone help?

This is how I tried it. Hustle executes, but sTaskLogFile is not created:

Code: Select all

sCMD = '"D:\Hustle\Hustle.exe" "' |  sTaskFile | '" "' | NumberToString(p_nThreads) | '"';
sCMD = sCMD | ' >> "' | sTaskLogFile | '" 2>&1';
ExecuteCommand(sCMD, 1);
I can asciioutput sCMD and execute it in a DOS box, it runs successfully and creates sTaskLogFile, only in the TI process it does not.

Any hints?

Thank you
Holger
holger_b
Posts: 131
Joined: Tue May 17, 2011 10:04 am
OLAP Product: TM1
Version: Planning Analytics 2.0
Excel Version: 2016
Location: Freiburg, Germany

Re: hustle.exe redirect output

Post by holger_b »

Well. After more fiddling around I got it to work after I made the call a parameter of cmd.exe and refrained from putting double quotes around the redirection target file... That is to say, for me it works quite simply like this:

Code: Select all

sCMD = 'D:\Hustle\Hustle.exe ' | sTaskFile | ' ' | NumberToString(p_nThreads);
sCMD = sCMD | ' > ' | sTaskLogFile;
ExecuteCommand('CMD /c ' | sCMD, 1);
Hope this will help someone else some day.

Regards
Holger
Post Reply