Page 1 of 1
Writing data in txt files using TextOutput function
Posted: Wed Jul 13, 2011 9:45 pm
by jbcraigs
We are trying to create logs in form of csv or text files which would log when a particular TI process ran along with some of the key variables.
I was planning to use Textoutput or ASCIIOutput functions but they overwrite the previous data present in the text file instead of just adding new rows.
Is there any other function which can be used to achieve this?
Thanks.
Re: Writing data in txt files using TextOutput function
Posted: Wed Jul 13, 2011 9:52 pm
by Alan Kirk
jbcraigs wrote:We are trying to create logs in form of csv or text files which would log when a particular TI process ran along with some of the key variables.
I was planning to use Textoutput or ASCIIOutput functions but they overwrite the previous data present in the text file instead of just adding new rows.
Is there any other function which can be used to achieve this?
Unfortunately not. Steve Vincent raised the idea as an
enhancement, but I don't know whether he's submitted it and when/if it will ever be created by IBM. In the meantime all you can do is use ExecuteCommand to run a batch file which merges multiple files. See BIHints' post in
this thread for further information.
Be aware that you won't be able to modify the source data file (if that's what you're planning to do; your post isn't clear on that) while the process still has a lock on it, but you could do it in a subsequent process in a chore.