hi guys,
i m tring to export data from a cube using ASCIIOutput on a TurboIntegrator process, and on txt export i have a string that contain a carriage return character,
i ve tried to cleansed in the same TI with DELET (pString, SCAN(CHAR(13), pString),1) but it didnt work
do you have any other suggestion
Best regards
Clean a carriage return character
- jim wood
- Site Admin
- Posts: 3951
- Joined: Wed May 14, 2008 1:51 pm
- OLAP Product: TM1
- Version: PA 2.0.7
- Excel Version: Office 365
- Location: 37 East 18th Street New York
- Contact:
Re: Clean a carriage return character
As long as you set your field quote character (default ") you should be ok. I guess it depends where the data is going? If it's going back in to TM1 you should be good.
Struggling through the quagmire of life to reach the other side of who knows where.
Shop at Amazon
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
Shop at Amazon
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
-
- Posts: 20
- Joined: Thu Mar 28, 2013 10:12 am
- OLAP Product: IBM Planning Analytics
- Version: 2.0.93
- Excel Version: 2 0 94 7
- Location: Paris, France
- Contact:
Re: Clean a carriage return character
Hi Jim,
Yes its going back to TM1,
and Yes the DatasourceASCIIQuoteCharacter='';
i ll try
thank you for your reply
Zied
Yes its going back to TM1,
and Yes the DatasourceASCIIQuoteCharacter='';
i ll try
thank you for your reply
Zied
-
- Posts: 20
- Joined: Thu Mar 28, 2013 10:12 am
- OLAP Product: IBM Planning Analytics
- Version: 2.0.93
- Excel Version: 2 0 94 7
- Location: Paris, France
- Contact:
Re: Clean a carriage return character
Well,
i have tried:
it works but the string is not loaded totally,
i explain:
LF = CHAR(13) = carriage return caracter,
pString = "tissu S31 'LF'
Partiel des fournitures 7/8" 'CR/LF'
Before i tried new code i had *ERR* on TM1 Cube, and after that i had "Tissu S31" and not all the string,
Any suggestions
Thank you in advance,
Zied
i have tried:
Code: Select all
nLength = Long(vValeur);
nScan = SCAN(CHAR(13), vValeur);
IF(nScan >0);
vValeur = SubSt(vValeur,1,nScan - 1) | ' ' | SubSt(vValeur,nScan + 1,nLength);
endif;
i explain:
LF = CHAR(13) = carriage return caracter,
pString = "tissu S31 'LF'
Partiel des fournitures 7/8" 'CR/LF'
Before i tried new code i had *ERR* on TM1 Cube, and after that i had "Tissu S31" and not all the string,
Any suggestions
Thank you in advance,
Zied
- jim wood
- Site Admin
- Posts: 3951
- Joined: Wed May 14, 2008 1:51 pm
- OLAP Product: TM1
- Version: PA 2.0.7
- Excel Version: Office 365
- Location: 37 East 18th Street New York
- Contact:
Re: Clean a carriage return character
Well the only thing I can suggest is doing a scan for carriage return ascii character. I can't remember its number but I believe it has one,
Jim.
Jim.
Struggling through the quagmire of life to reach the other side of who knows where.
Shop at Amazon
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
Shop at Amazon
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
-
- MVP
- Posts: 3105
- 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: Clean a carriage return character
Now it will become evident:
Code: Select all
DatasourceASCIIQuoteCharacter = '';
vValeur = 'A ' | Char( 10 ) | ' B ' | Char( 13 ) | ' C ';
AsciiOutput( 'test.txt', vValeur );
# replace CRLF
nLength = Long( vValeur );
nScan = Scan( Char(13), vValeur );
If( nScan > 0 );
vValeur = Subst( vValeur, 1, nScan - 1 ) | ' ' | SubSt( vValeur, nScan + 1, nLength );
EndIf;
AsciiOutput( 'test.txt', '' );
AsciiOutput( 'test.txt', vValeur );
# replace LF
nLength = Long( vValeur );
nScan = Scan( Char(10), vValeur );
If( nScan > 0 );
vValeur = Subst( vValeur, 1, nScan - 1 ) | ' ' | SubSt( vValeur, nScan + 1, nLength );
EndIf;
AsciiOutput( 'test.txt', '' );
AsciiOutput( 'test.txt', vValeur );
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: 20
- Joined: Thu Mar 28, 2013 10:12 am
- OLAP Product: IBM Planning Analytics
- Version: 2.0.93
- Excel Version: 2 0 94 7
- Location: Paris, France
- Contact:
Re: Clean a carriage return character
Thank you wim,
it works now ^^
Thk you guys
Best regards
it works now ^^
Thk you guys
Best regards
-
- MVP
- Posts: 3105
- 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: Clean a carriage return character
You're welcome
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