Hi All,
I have been trying achieve row record count and decimals in asciioutput file-but unsuccessful- i thought seek your advise
In the asciioutput - file it need to contain decimal and trailing zeros.
Example AMOUNT column need to contain the decimal 4 places like 1234 filed would look like 1234.0000.
My Code
AsciiOutput( sFilename, 'vCurrenies', vDeptarment,vProject,vAccount,vPeriod, NumberToString(VALUE) );
I also need to do trailing record count in file output file
appreciate your advise.
Thanks
10.2 ver
asciioutput record count
-
- Site Admin
- Posts: 6647
- 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: asciioutput record count
Instead of using NumberToString, use NumberToStringEx. Knowing IBM the link that I've provided should be good for a week or two; after that just consult the .pdf copy of the Reference Guide.ravi wrote: I have been trying achieve row record count and decimals in asciioutput file-but unsuccessful- i thought seek your advise
In the asciioutput - file it need to contain decimal and trailing zeros.
Example AMOUNT column need to contain the decimal 4 places like 1234 filed would look like 1234.0000.
My Code
AsciiOutput( sFilename, 'vCurrenies', vDeptarment,vProject,vAccount,vPeriod, NumberToString(VALUE) );
Declare a variable like iRecordCount = 0; in the Prolog. As the first line in the data tab, update that as iRecordCount = iRecordCount + 1;ravi wrote:I also need to do trailing record count in file output file
You can then output that as part of the AsciiOutput just as you do with the Value.
"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.
-
- Posts: 138
- Joined: Mon Apr 26, 2010 12:39 pm
- OLAP Product: cognos
- Version: tm1 9.5
- Excel Version: 2007
Re: asciioutput record count
Hi Alan,
Thank you record count worked after i tried per your suggestion.
I am still having problem to of using "NumberToStringEx" - I will come back if I can't get it.
thanks again.
Thank you record count worked after i tried per your suggestion.
I am still having problem to of using "NumberToStringEx" - I will come back if I can't get it.
thanks again.
-
- Posts: 138
- Joined: Mon Apr 26, 2010 12:39 pm
- OLAP Product: cognos
- Version: tm1 9.5
- Excel Version: 2007
Re: asciioutput record count
Hi
I have been trying to use NumberToStringEx to get decimal after the values, example 1234 to 1234.0000
ASCIIOUTPUT(pFile , vdepartmentt | '|' | vDepartDescr | '|' | NUMBERTOSTRINGEX(ROUNDP(Value,'#,00)) | '|' | dPeriod | '|' | sASOFDATE);
I thought to get expert advise- with some example and explanation.
Thank you for your time.
Ravi
I have been trying to use NumberToStringEx to get decimal after the values, example 1234 to 1234.0000
ASCIIOUTPUT(pFile , vdepartmentt | '|' | vDepartDescr | '|' | NUMBERTOSTRINGEX(ROUNDP(Value,'#,00)) | '|' | dPeriod | '|' | sASOFDATE);
I thought to get expert advise- with some example and explanation.
Thank you for your time.
Ravi
-
- Site Admin
- Posts: 6647
- 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: asciioutput record count
Exactly how closely did you look at the documentation that I provided you with a link to?ravi wrote:Hi
I have been trying to use NumberToStringEx to get decimal after the values, example 1234 to 1234.0000
ASCIIOUTPUT(pFile , vdepartmentt | '|' | vDepartDescr | '|' | NUMBERTOSTRINGEX(ROUNDP(Value,'#,00)) | '|' | dPeriod | '|' | sASOFDATE);
I thought to get expert advise- with some example and explanation.
- Closely enough to know that RoundP is about precision, not formatting and that its second argument is not a format string, but a number of decimal places?
- To know that format strings need to have closing as well as opening quote marks? (Meaning that the expression above would not have even compiled, much less run.)
- That NumberToStringEx has four arguments, not two?
- That if you want four decimal places, you would probably be better off using four zeroes, not two in the format string?
Please take a look at the Reference Guide links again and have another shot at it.
"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.
-
- Posts: 138
- Joined: Mon Apr 26, 2010 12:39 pm
- OLAP Product: cognos
- Version: tm1 9.5
- Excel Version: 2007
Re: asciioutput record count
It worked finally...
ASCIIOUTPUT(pFile , vdepartmentt | '|' | vDepartDescr | '|' | sRet | '|' | dPeriod | '|' | sASOFDATE);
#sRet= NumberToStringEx(Value, '####0.0000', '.', '');
Thanks again for your time..
ASCIIOUTPUT(pFile , vdepartmentt | '|' | vDepartDescr | '|' | sRet | '|' | dPeriod | '|' | sASOFDATE);
#sRet= NumberToStringEx(Value, '####0.0000', '.', '');
Thanks again for your time..