TI Process Questions
TI Process Questions
A few questions:
--------------------
Within a TI process - how can you find out the names of all cubes?
- Possible solution to look in the Data folder for all files named *.cub ?
Within a TI process - how can you find out the names of all dimensions?
Within a TI process - how can you find out which dimensions a cube is using?
Within a TI process - how can you find out which cubes use a particular dimension?
--------------------
Within a TI process - how can you find out the names of all cubes?
- Possible solution to look in the Data folder for all files named *.cub ?
Within a TI process - how can you find out the names of all dimensions?
Within a TI process - how can you find out which dimensions a cube is using?
Within a TI process - how can you find out which cubes use a particular dimension?
Re: TI Process Questions
nhavis wrote:A few questions:
--------------------
Within a TI process - how can you find out the names of all cubes?
- Possible solution to look in the Data folder for all files named *.cub ?
Within a TI process - how can you find out the names of all dimensions?
Within a TI process - how can you find out which dimensions a cube is using?
Within a TI process - how can you find out which cubes use a particular dimension?
Cubes - loop through }Cubes dimension
Dimns - loop through }Dimensions dimension
Cube/Dimn usage - TABDIM function
G
Re: TI Process Questions
Thanks - how can I get the number of dimensions in a cube?
-
- Site Admin
- Posts: 6643
- Joined: Sun May 11, 2008 2:30 am
- OLAP Product: TM1
- Version: PA2.0.9.18 Classic NO PAW!
- Excel Version: 2013 and Office 365
- Location: Sydney, Australia
- Contact:
Re: TI Process Questions
Just loop through the dims until you hit a blank. For example:nhavis wrote:Thanks - how can I get the number of dimensions in a cube?
Code: Select all
SC_CUBE = 'YourCubeName';
l_Counter = 1;
While ( l_Counter <=256 );
s_DimName = TabDim ( SC_CUBE, l_Counter);
If ( s_DimName @= '');
l_NumberOfDims = l_Counter - 1;
l_Counter = 257;
Else;
l_Counter = l_Counter + 1;
EndIf;
End;
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
Re: TI Process Questions
Thanks for the quick and concise replies -
How can I add in a a newline character to a string?
Eg.
string = 'Hello';
string = string|'\n';
string = string|'more';
ASCIIOUTPUT('output.txt', string);
How can I add in other special characters?
How can I add in a a newline character to a string?
Eg.
string = 'Hello';
string = string|'\n';
string = string|'more';
ASCIIOUTPUT('output.txt', string);
How can I add in other special characters?
-
- Site Admin
- Posts: 6643
- Joined: Sun May 11, 2008 2:30 am
- OLAP Product: TM1
- Version: PA2.0.9.18 Classic NO PAW!
- Excel Version: 2013 and Office 365
- Location: Sydney, Australia
- Contact:
Re: TI Process Questions
Use the CHAR rules function. New line is Char(10) (though you probably really want carriage return which is Char(13)). You can Google a list of ASCII codes for other characters; there are a lot of charts out there, though I don't have any bookmarked at the moment.nhavis wrote:Thanks for the quick and concise replies -
How can I add in a a newline character to a string?
Eg.
string = 'Hello';
string = string|'\n';
string = string|'more';
ASCIIOUTPUT('output.txt', string);
How can I add in other special characters?
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
Re: TI Process Questions
I see, thanks again -
Is it possible to write an output file without the quotes that ASCIIOUTPUT includes?
Is there any kind of console or substitute?
Is it possible to write an output file without the quotes that ASCIIOUTPUT includes?
Is there any kind of console or substitute?
-
- Regular Participant
- Posts: 152
- Joined: Fri May 23, 2008 12:08 am
- OLAP Product: TM1 CX
- Version: 9.5 9.4.1 9.1.4 9.0 8.4
- Excel Version: 2003 2007
- Location: Melbourne, Australia
- Contact:
Re: TI Process Questions
ASCIIOutput and TextOutput both write comma delimited files and only output string values encased in quotes, if you want to change this see Gregor's post below 

Last edited by ScottW on Fri Jan 16, 2009 3:17 am, edited 1 time in total.
Re: TI Process Questions
Thanks -
In regards to inserting new line characters: I tried the following and in notepad it seems not to work:
string = '123';
string = string | Char(10);
string = string | Char(13);
string = string | '456';
ASCIIOUTPUT('output.txt', string);
ExecuteCommand('notepad output.txt', 0);
output.txt contained (when viewed in notepad):
"123456"
however the newline characters were present when viewed in vim/wordpad etc.
In regards to inserting new line characters: I tried the following and in notepad it seems not to work:
string = '123';
string = string | Char(10);
string = string | Char(13);
string = string | '456';
ASCIIOUTPUT('output.txt', string);
ExecuteCommand('notepad output.txt', 0);
output.txt contained (when viewed in notepad):
"123456"
however the newline characters were present when viewed in vim/wordpad etc.
-
- Site Admin
- Posts: 6643
- Joined: Sun May 11, 2008 2:30 am
- OLAP Product: TM1
- Version: PA2.0.9.18 Classic NO PAW!
- Excel Version: 2013 and Office 365
- Location: Sydney, Australia
- Contact:
Re: TI Process Questions
They're there in Notepad too, but the way you've output them they'll just appear as rectangular blocks representing control characters.nhavis wrote:Thanks -
In regards to inserting new line characters: I tried the following and in notepad it seems not to work:
string = '123';
string = string | Char(10);
string = string | Char(13);
string = string | '456';
ASCIIOUTPUT('output.txt', string);
ExecuteCommand('notepad output.txt', 0);
output.txt contained (when viewed in notepad):
"123456"
however the newline characters were present when viewed in vim/wordpad etc.
The usual sequence when you combine a carriage return and line feed (alias New Line) is CRLF rather than LFCR. Reverse the order so that it's
Code: Select all
string = string | Char(13);
string = string | Char(10);
Code: Select all
string = string | Char(10);
string = string | Char(13);
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-
- MVP
- Posts: 263
- Joined: Fri Jun 27, 2008 12:15 am
- OLAP Product: Cognos TM1, CX
- Version: 9.0 and up
- Excel Version: 2007 and up
Re: TI Process Questions
Hi
If you want AsciiOutPut without quotes use function
(that's two single quotes no space)
DataSourceASCIIQuoteCharacter='';
If you want no delimiter use function
(can be changed to anything)
DatasourceASCIIDelimiter='';
If you want your output to be eg
123
789
use the above and then
AsciiOutPut('filename', '123');
AsciiOutPut('filename', '789');
Hope it helps
Cheers
Gregor
If you want AsciiOutPut without quotes use function
(that's two single quotes no space)
DataSourceASCIIQuoteCharacter='';
If you want no delimiter use function
(can be changed to anything)
DatasourceASCIIDelimiter='';
If you want your output to be eg
123
789
use the above and then
AsciiOutPut('filename', '123');
AsciiOutPut('filename', '789');
Hope it helps
Cheers
Gregor