Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Number of decimal places for percent

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Number of decimal places for percent
 Login/Join
 
Member
posted
Can I get more than two decimal places on a PCT.? I have defined the field as D8.4% but still only get two decimal places in the output.
Thanks!

This message has been edited. Last edited by: tinamshorty,


FOCUS for Mainframe 7.2
Windows and IBM Z9 Mainframe processor
FOCUS, Excel


 
Posts: 21 | Registered: October 31, 2008Report This Post
Virtuoso
posted Hide Post
Should work. We have some formatted to 6 places. Can you give us a code snippet?


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
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Expert
posted Hide Post
TABLE FILE CAR
SUM
RETAIL_COST
PCT.RETAIL_COST/D8.4%
BY COUNTRY
END


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Member
posted Hide Post
Darin,
Here is a snippet of the code. Thanks!

TABLE FILE IMACCM
SUM
PCT.TRAN_AMT/D8.4% NOPRINT
BY BANK NOPRINT
BY TC NOPRINT
COUNT ACCT AS ''
BY BANK NOPRINT
BY TC NOPRINT
BY R_TC8 AS 'TC'
BY DTPOST AS 'POSTED'
ACROSS R_TRAN_AMT AS 'TX AMT'
ON TC SUBFOOT
TOTAL PERCENTAGE OF DOLLAR AMOUNT FOR
TC = ST.PCT.TRAN_AMT

Do I need the formatting on the SUBFOOT?


FOCUS for Mainframe 7.2
Windows and IBM Z9 Mainframe processor
FOCUS, Excel


 
Posts: 21 | Registered: October 31, 2008Report This Post
Virtuoso
posted Hide Post
About the only time I can think of when this doesn't work as you might expect is when doing a PCT.CNT.fieldname. For whatever reason, if you just throw a format on the end of that (/D8.5%) it gets ignored. Whether that's a bug or not is up for discussion - I vote aye.) This is easily overcome by making it a compute (COMPUTE NFIELD/D8.5%=PCT.CNT.FIELDNAME; ) Any other PCT. usage should work as Francis shows.


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
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Expert
posted Hide Post
Please put your code between
[code]
[/code]
tags as the subfoot code is not displayed in your posting.

You will have to compute the percentage and use that computed field in the subfoot:

TABLE FILE CAR
SUM
COMPUTE PCT_RETAIL/D8.4% = PCT.RETAIL_COST; NOPRINT
RETAIL_COST
PCT.RETAIL_COST/D8.4%
BY COUNTRY SUBHEAD
"<PCT_RETAIL"
END


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
If you're using it later in a subfoot, I would definitely make it a COMPUTEd field


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
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Member
posted Hide Post
Thanks Darin and Francis!
I will try the compute and let you know!


FOCUS for Mainframe 7.2
Windows and IBM Z9 Mainframe processor
FOCUS, Excel


 
Posts: 21 | Registered: October 31, 2008Report This Post
Virtuoso
posted Hide Post
What is the format of TRAN_AMT? If it is an integer, you will not see any decimals with PCT.TRAN_AMT. Run the following example:
  
DEFINE FILE CAR
DSALES/D6=SALES;
END
TABLE FILE CAR
SUM
SALES
PCT.SALES/D8.4%
PCT.DSALES/D8.4%
BY COUNTRY
END


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Member
posted Hide Post
The format of TRAN_AMT is P19.2.
I tried the COMPUTE and it is now working.
Thanks for your help everyone. I am new to FOCUS and just getting ready to get into WebFOCUS so i have alot to learn from all the postings and doc you have here.


FOCUS for Mainframe 7.2
Windows and IBM Z9 Mainframe processor
FOCUS, Excel


 
Posts: 21 | Registered: October 31, 2008Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Number of decimal places for percent

Copyright © 1996-2020 Information Builders