|
Go
![]() |
New
![]() |
Search
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
|
Platinum Member |
[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 |
||
|
|
Platinum Member |
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 |
|||
|
|
Virtuoso |
You have to put the HIGHEST first in the list. What you have sorts highest within COL.
Ginny --------------------------------- Prod: WF 7.6.5 with 7.6.6 WFRS; AIX 5.2; WebSphere 6.1.0.15 Dev: WF 7.6.5 with 7.6.6 WFRS; AIX 5.3; WebSphere 6.1.0.15 Primarily self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable |
|||
|
|
Platinum Member |
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 |
|||
|
|
Master |
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 7.6.7, Win |
|||
|
|
Platinum Member |
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 |
|||
|
| Previous Topic | Next Topic | powered by eve community |
| Please Wait. Your request is being processed... |
|

