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] HIGHEST function not working for me

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] HIGHEST function not working for me
 Login/Join
 
Guru
posted
[SOLVED] In a FEX, I've got three fields and I want to be able to print my highest student count by college. However, my counts are not coming out the way I want them, going highest to lowest. What am I doing wrong? Here is my code snippet:

STDCNT  /I06 = IF (STU_ID EQ LAST STU_ID) THEN 0 ELSE 1;      
END                                             -*                                               
TABLE FIOE NLCDIST                                                   
SUM   STDCNT                                                      
      COL                                                          
      TRNS_HIGHSCH                                                 
BY    COL NOPRINT                                                  
BY    HIGHEST STDCNT NOPRINT                                       
BY    TRNS_HIGHSCH NOPRINT                                         
ON TABLE HOLD AS NLCDIST1                                          
END                                                                
-RUN                                                               
  

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


Mainframe FOCUS 7.0
VM/CMS and MVS/TSO
 
Posts: 250 | Registered: January 14, 2008Report This Post
Guru
posted Hide Post
In reference to my first posting, here is a partial display of what I am currently getting:

NLC 0 SAMUEL CLEMENS HIGH
NLC 0 WAGNER HIGH SCHOOL
SAC 100
SAC 1 A BEKA ACADEMY DVD PROGRAM
SAC 1 A C JONES HIGH SCHOO
SAC 1 A CRAWFORD MOSLEY HI
SAC 1 A&M CONSOLIDATED
SAC 38 ACADEMY OF CREATIVE EDUCATION
SAC 1 ACADEMY OF RICHMOND

So, please not the counts are not in sequence. If anyone has an idea, I'd love to see where I am making my mistakes. Thanks....


Mainframe FOCUS 7.0
VM/CMS and MVS/TSO
 
Posts: 250 | Registered: January 14, 2008Report This Post
Expert
posted Hide Post
You have to put the HIGHEST first in the list. What you have sorts highest within COL.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Guru
posted Hide Post
Hi, Ginny,

And that's what I want.... highest within COL. In short, I am trying to list, within each college, the highest counts of grads from high schools going to that college:
NLC 10 XYZ HIGH SCHOOL
NLC 9 AVC HIGH SCHOOL
NLC 1 MY SCHOOL
SAC 132 QWE HIGH SCHOOL
SAC 79 THE OLD SCHOOL
SAC 78 THE NEW SCHOOL
SAC 6 THE MIDDLE HIGH SCHOOL
SAC 0 MIDWEST HIGH SCHOOL

To get that type of result, are you saying I should put the HIGHEST code first? Or am I not doing something correctly?

Thanks so much for replying......


Mainframe FOCUS 7.0
VM/CMS and MVS/TSO
 
Posts: 250 | Registered: January 14, 2008Report This Post
Virtuoso
posted Hide Post
Almost right. To calculate (sum) STDCNT within COLLEGE and TRNS_HIGHSCH, and then rearrange acording to the summed value of STDCNT, change the second BY to BY TOTAL.

TABLE FILE NLCDIST
SUM STDCNT
COL
TRNS_HIGHSCH
BY COL NOPRINT
BY TOTAL HIGHEST STDCNT NOPRINT
BY TRNS_HIGHSCH NOPRINT
ON TABLE HOLD AS NLCDIST1
END


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Guru
posted Hide Post
Jack,

THAT WORKED! THANK YOU!

And a big thanks and appreciation to all who offered suggestions and advice. You are a great bunch of people.


Mainframe FOCUS 7.0
VM/CMS and MVS/TSO
 
Posts: 250 | Registered: January 14, 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] HIGHEST function not working for me

Copyright © 1996-2020 Information Builders