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]Count Each redundant ITEMCODEs

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]Count Each redundant ITEMCODEs
 Login/Join
 
Platinum Member
posted
I would like to make a define that can count each time a ITEMCODE is redundant and if not just count 1 for that ITEMCODE. and then just show each unique ITEMCODE and the count

EX.
ITEMCODE
12345
12346
12347
12347
12347
12348
12348
12349
12350
12351
12351

output

ITEMCODE___COUNT
12345______1
12346______1
12347______3
12348______2
12349______1
12350______1
12351______2



Thanks for the help!

This message has been edited. Last edited by: Charles Richards,


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 111 | Registered: May 12, 2011Report This Post
Expert
posted Hide Post
Use the COUNT verb:

SET HOLDLIST=PRINTONLY
SET HOLDFORMAT=ALPHA
SET ASNAMES=ON
-RUN

-*-- Create the master for ITEM
APP FI DATAMAST DISK item.mas
-RUN

-WRITE DATAMAST FILE=ITEM, SUFFIX=FIX, $
-WRITE DATAMAST SEGNAME=SEG1, SEGTYPE=S0, $
-WRITE DATAMAST FIELD=ITEMCODE, ALIAS=ITEMCODE, USAGE=A05, ACTUAL=A05, $

-*-- Create the data file for ITEM
APP FI ITEM DISK item.ftm
-RUN

-WRITE ITEM 12345
-WRITE ITEM 12346
-WRITE ITEM 12347
-WRITE ITEM 12347
-WRITE ITEM 12347
-WRITE ITEM 12348
-WRITE ITEM 12348
-WRITE ITEM 12349
-WRITE ITEM 12350
-WRITE ITEM 12351
-WRITE ITEM 12351

TABLE FILE ITEM
COUNT
ITEMCODE AS 'ITEM_COUNT'
BY ITEMCODE
ON TABLE HOLD AS H001
END
-RUN

TABLE FILE H001
PRINT *
END
-RUN


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
Master
posted Hide Post
or the old 'Sum' way.

TABLE FILE CAR
SUM
CNT.COUNTRY

BY COUNTRY 
END


- ABT


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
 
Posts: 561 | Registered: February 03, 2010Report This Post
Platinum Member
posted Hide Post
Thank you so much for your help!


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 111 | Registered: May 12, 2011Report 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]Count Each redundant ITEMCODEs

Copyright © 1996-2020 Information Builders