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     [CLOSED] CNT.DST issue

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] CNT.DST issue
 Login/Join
 
Gold member
posted
Hi,

I'm calculating Count of distinct customername and when I'm writing CNT.DST.CUSTOMERNAME AS CUSTOMERCOUNT, in the output I'm also getting a blank column with the heading customername. Can anybody please sugeest why I'm getting this column with the column customercount?

Thank you.

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


WebFOCUS 8.2.02
Windows, All Outputs
 
Posts: 95 | Registered: May 16, 2016Report This Post
Guru
posted Hide Post
Hello,

Can you reproduce your code using CAR.MAS ?


WebFOCUS 8.1.05 / APP Studio
 
Posts: 272 | Location: Brazil | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
Or provide us the code you have created so we can look it over, but an example using one of the tables in /apps/ibisamp will be a lot easier to understand.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Platinum Member
posted Hide Post
You don't have a BY in there anywhere do you? Code would definitely help.


JC
WebFOCUS Dev Studio / App Studio
8.2.01
Windows 7
 
Posts: 146 | Registered: November 09, 2015Report This Post
Gold member
posted Hide Post
Here is the code:

TABLE FILE ABI_CUSTOMER_V
SUM
CNT.DST.CUSTOMERNAME AS YTDCUSTOMERCOUNT
BY OFFI
BY DIV
WHERE WEEKENDINGDATE GE &FIRSTWEEKENDINGDATE;
WHERE WEEKENDINGDATE LE &WEEKENDINGDATE;
ON TABLE HOLD AS ABI_CUSTOMERNAMECOUNT
ON TABLE SET BYDISPLAY ON
END


WebFOCUS 8.2.02
Windows, All Outputs
 
Posts: 95 | Registered: May 16, 2016Report This Post
Expert
posted Hide Post
Can you reproduce your code using CAR.MAS as we don't have access to your view?

What the title for the "CNT.DST.CUSTOMERNAME" field?
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Platinum Member
posted Hide Post
Interesting. I tried something similar:

TABLE FILE RPT_CAACTIVITIES
SUM    CNT.DST.RPT_CAACTIVITIES.RPT_CAACTIVITIES.CUSTOMER_NAME
BY  RPT_CAACTIVITIES.RPT_CAACTIVITIES.LOCATION
WHERE RPT_CAACTIVITIES.RPT_CAACTIVITIES.REQUEST_STARTED GE DT(2016-06-01 12:00:00AM);
ON TABLE SET BYDISPLAY ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
END  


When I run this as expected I get two columns: "LOCATION" and "COUNT DISTINCT Customer Name".

Are you able to reproduce a similar result with using the CAR file?


JC
WebFOCUS Dev Studio / App Studio
8.2.01
Windows 7
 
Posts: 146 | Registered: November 09, 2015Report This Post
Expert
posted Hide Post
Weird... This works...
TABLE FILE CAR
SUM CNT.DST.MODEL
BY  COUNTRY
ON TABLE SET BYDISPLAY ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
END

Produces this:
            COUNT 
         DISTINCT
COUNTRY     MODEL
ENGLAND         4 
FRANCE          1 
ITALY           4 
JAPAN           2 
W GERMANY       7 

But, then again, CAR is a FOCUS DB, not a view...
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Gold member
posted Hide Post
When I'm running this code I'm getting the following columns:
Country, Bodytype, Countmodel, Model. I'm trying to understand why the column model is coming.


-SET &ECHO = 'ALL';
SET ASNAMES = ON

TABLE FILE CAR
SUM CNT.DST.MODEL AS COUNTMODEL
BY COUNTRY
BY BODYTYPE
ON TABLE HOLD AS A
END


TABLE FILE A
PRINT *
END
-EXIT


WebFOCUS 8.2.02
Windows, All Outputs
 
Posts: 95 | Registered: May 16, 2016Report This Post
Expert
posted Hide Post
TABLE FILE CARSUM
CNT.DST.MODEL AS COUNTMODEL
BY COUNTRY
BY BODYTYPE
ON TABLE HOLD AS A
END"

OOooo I C now... Your going to a hold file. That's a whole new story.
The "Extra' column is the source column for the DST.CNT. Check out the "HOLDLIST" option. I'm feeling generous today so I'll give it to you here, add "ON TABLE SET HOLDLIST PRINTONLY" just before your "ON TABLE HOLD AS A" statement.
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Expert
posted Hide Post
Use SET HOLDLIST = PRINTONLY to only hold the columns that are specified.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
That's the call Tony...

I like being selective an explicit. So, I do it on a TABLE ... HOLD by TABLE ... HOLD basis: "ON TABLE SET HOLDLIST PRINTONLY".
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Gold member
posted Hide Post
Thank you all. Adding ON TABLE SET HOLDLIST PRINTONLY before 'ON TABLE HOLD AS A' solved the problem.
 
Posts: 95 | Registered: May 16, 2016Report 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     [CLOSED] CNT.DST issue

Copyright © 1996-2020 Information Builders