Page 1 of 1

How to create a specific file ?

Posted: Mon Jul 21, 2014 2:21 pm
by beber005
Hello everyone, :)

I have a very difficult problem. I have already write a process which works but I want to optimize it. To sum up, I have one parameter cube which contains some information. These information are status.
A customer has many different statut, it depend on one specific date (year and month). My process creates an output file, associating status with a customer at a given date.
My problem is the following :
- I have two parameters in my process
- My process only creates a file for one year / month data
- I want to my process creates every month < or = to my parameter month and for each month create it can assign a status to a client
- Each month must be separated by a header that is of the following form:
"Aircraft_Prod_12_2013
Aircraft_Prod_12_2013 NA_PRD_12_2013
Aircraft_Prod_12_2013 NA_ANT_12_2013"
- These are the headers that need to change month by month

I don't know if my problem is well described beacause it is not easy to explain.

Thank's a lot to the community for helping me :))

Re: How to create a specific file ?

Posted: Mon Jul 21, 2014 4:17 pm
by lotsaram
Is this not the same question you asked here? http://www.tm1forum.com/viewtopic.php?f ... 707#p48707

Re: How to create a specific file ?

Posted: Tue Jul 22, 2014 5:44 am
by beber005
Yes, but I I wanted to write a new post to explain better the problem because I had ignored this development for some weeks and I are just recovering. But the problem is the same and I didn't success to do that

Re: How to create a specific file ?

Posted: Tue Jul 29, 2014 3:56 pm
by TrevorGoss
Hello beber005.

Any luck with your issue yet? has it been resolved by information in this forum?

If you want to create headers in your ASCIIOUTPUT and put data under each header, you can create the ASCII and the open it again by re creating it and placing your data under the headers.

My code below demonstrates what I mean:

Code: Select all

vHeader1 = 'Header1';     vHeader2 = 'Header2';                vHeader3 = 'Header3';

ASCIIOUTPUT('Z:\Headers.txt',vHeader1,vHeader2,vHeader3);

ASCIIOUTPUT('Z:\Headers.txt','Test1','Test2','Test3');
The 'Test' data goes under each header.

Does this help at all?