Hi,
I am doing ascii ouput of few files from TI .
The file is always having a blank row at the end . We are not sure whats causing this and is there a way to not having this blank row at end .
I am pasting my TI code that extracts the file .
Prolog:
DatasourceASCIIDelimiter=Char(9);
DatasourceASCIIQuoteCharacter='';
count = 0;
Data :
IF (count = 0);
ASCIIOUTPUT('Extracts\\Countries.txt', 'All Countries', 'Area', 'Region','Country', 'CountryDescription');
ENDIF;
vLev1 =ELPAR('Countries', vElement, 1);
vLev2 =ELPAR('Countries', vLev1, 1);
vCountryAttr = ATTRS('Countries', vElement, 'Description');
IF (vCountryAttr @= '');
vCountryAttr = vElement;
ENDIF;
SetOutputEscapeDoubleQuote('Extracts\\Countries.txt', 1);
ASCIIOUTPUT('Extracts\\Countries.txt', 'All Countries', vLev2, vLev1,vElement, vCountryAttr);
count = count +1;
Any suggestions is appreciated.
Thanks,
Ascii output ,blank row at end
-
- MVP
- Posts: 3117
- Joined: Mon Dec 29, 2008 6:26 pm
- OLAP Product: TM1, Jedox
- Version: PAL 2.0.9.18
- Excel Version: Microsoft 365
- Location: Brussels, Belgium
- Contact:
Re: Ascii output ,blank row at end
Hello,
You cannot avoid it. It's caused by a carriage return character after outputting the last-but-one line in the text file.
Why would it bother you ? Does a different system need to have the file without the last empty line ?
You cannot avoid it. It's caused by a carriage return character after outputting the last-but-one line in the text file.
Why would it bother you ? Does a different system need to have the file without the last empty line ?
Best regards,
Wim Gielis
IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Wim Gielis
IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
-
- Posts: 124
- Joined: Wed Nov 26, 2014 8:32 pm
- OLAP Product: IBM TM1, Planning Analytics
- Version: PA 2.0.5
- Excel Version: 2016
Re: Ascii output ,blank row at end
Yes a different system needs it without a blank line . Any workarounds.
-
- MVP
- Posts: 3117
- Joined: Mon Dec 29, 2008 6:26 pm
- OLAP Product: TM1, Jedox
- Version: PAL 2.0.9.18
- Excel Version: Microsoft 365
- Location: Brussels, Belgium
- Contact:
Re: Ascii output ,blank row at end
Maybe a batch file that removes the last character of the file ?
Or, if possible, instruct the other program to skip empty lines (which Turbo Integrator does by default -
empty lines do not give rise to Metadata and Data tab code execution).
Or, if possible, instruct the other program to skip empty lines (which Turbo Integrator does by default -
empty lines do not give rise to Metadata and Data tab code execution).
Best regards,
Wim Gielis
IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Wim Gielis
IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly