As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
I have a problem when I insert an eighteen-figure number as in the example:
DEFINE FILE CAR DATO/P32.6 = 123456789012345678; END
TABLE FILE CAR PRINT COUNTRY AS '' DATO AS '' ON TABLE PCHOLD FORMAT EXL2K ON TABLE SET STYLE * TYPE=REPORT, UNITS=PTS, COLUMN=P1, WRAP=200, $ TYPE=REPORT, UNITS=PTS, COLUMN=P2, WRAP=200, $ ENDSTYLE END
When I print my report, the number appears like that 123456789012346000,000000.
What I have done is to convert the number to char putting TO_CHAR(DATO) but if the user wants to do any operation with that like sum or whatever, it will not be possible as it is a string.
Any idea?
Thank you!!This message has been edited. Last edited by: Kerry,
Where did you put this TO_CHAR conversion? If I run your code as you provide it, it gives me the correct result, with the possibility to do calculations, like SUM in excel. But if you convert it to character thenof course, calculations can't be done anymore. What exactly do you want/need to do?
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
Hi! If we run the code, the number 123456789012345678 appears like that 123456789012346000,000000 instead of 12345678901234678,000000. So the number is incorrect.
Ah, now I see what the problem is. But, this is not a webfocus problem. If you do a pchold (without the format exl2k) everything shows fine. If you take the large number and put it into a cell in your excel sheet, excel will show the value as 1.23457E+17. In the formula bar the value for that cell shows as 123456789012345000. And, if you then try to format the cell as number, with for instance 2 decimals, you get exact the same result as you described, so the culprit here is excel, not webfocus.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
I've run into the same problem and what I found was that if Excel thinks a string is a number, it will only keep 17 significant digits. The way I forced EXCEL to keep all the digits was add an apostrophe to the beginning of the numeric string. This forces Excel to treat the numeric string as a string and not a number. For example, instead of sending 123456789012345678, I send '123456789012345678.
I've noticed that even if I use a .csv file and the string is inside "1234", if the string is all numbers, Excel considers this to be a number and not a string. Adding the apostrophe to the beginning is the only way I've found to force Excel to treat a numeric string as a string and not a number.
In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006