Focal Point
[SOLVED] Convert comma to decimalpoint

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/332106634

May 07, 2010, 08:01 AM
MrM
[SOLVED] Convert comma to decimalpoint
Hi


I have a string like -211,12 i want to convert this to -211.12 (convert comma to decimalpoint).
I have used the following command but get a error.

-SET &NUMBER = STRREP(07,'-211,12',1,',',1,'.',07,'A07');

(FOC36355) INVALID TYPE OF ARGUMENT #6 FOR USER FUNCTION STRREP

How can i convert this?

This message has been edited. Last edited by: Kerry,
May 07, 2010, 08:16 AM
fatboyjim
Hi,

You can try this document.

http://techsupport.information...om/sps/60112505.html

It mentions about function not liking the period.

Hope this helps.

Best Regards,

Jimmy Pang


DEV: WF 7.6.10
TEST: WF 7.6.10
PROD: WF 7.6.10
MRE: WF 7.6.4
OS/Platform: Windows
Dev Studio: WF 7.7
Output: HTML, EXCEL, PDF, GRAPH, LOTUS, CSV
May 07, 2010, 09:21 AM
jfr99
Here's the CTRAN function:

-SET &T1_STR = '-211,12';
-SET &NUMBER = CTRAN(07, &T1_STR, 44, 46, 'A07');
-*
-TYPE T1_STR ------- &T1_STR
-TYPE NUMBER ------- &NUMBER


WebFocus 8.201M, Windows, App Studio
May 07, 2010, 12:28 PM
Darin Lee
So the string is really a nunmber that you want to evaluate, you're not really wanting a string. JFR99's code should get you what you need, but you might try doing a search on CDN (continental decimal notation) and see if that might help resolve your situation.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
May 09, 2010, 05:37 AM
MrM
Tanks all for your help

I got another solution that seems to work:

-SET &NUMBER = STRREP(07,'-211,12',1,',',1,HEXBYT(46, 'A1'),07,'A07');

replace '.' by HEXBYT(46, 'A1')