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] subtotal on an alphanumeric field

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] subtotal on an alphanumeric field
 Login/Join
 
Gold member
posted
Hello,

I have an alphanumeric field which is A20. The field only has numbers.
I want to subtotal on the alphanumeric field.
When I try to convert the alphanumeric to decimal using ATODBL, the maximum limit is 15 which is not serving my purpose.
I have set SET SUMMARYLINES = NEW and tried SUBTOTAL, RECOMPUTE and SUMMARIZE, but it always gives the latest value.

Can somebody suggest a way to do a subtotal on alphanumeric fields?


Thanks

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


WebFOCUS 7.7.02Windows
Output Formats: Excel, HTML, PDF
 
Posts: 82 | Registered: February 23, 2011Report This Post
Expert
posted Hide Post
COLUMN1/A20 = '12345678901234567890';
COLUMN2/P20 = EDIT(COLUMN1);

OR

COLUMN2/I20S = EDIT(COLUMN1);


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Gold member
posted Hide Post
Hello Tom,

I tried what you told but it is not working.
The following is my define.
alpha_amt_sold/A20=FTOA(LL_AMT_SOLD, '(D20.2)', alpha_amt_sold);
equivsold/A20=IF type EQ 'Forward' THEN '' ELSE alpha_amt_sold;

I am converting the LL_AMT_SOLD (originally D20.2) to alpha so that I can use the second define.
Now I have to subtotal on the field "equivsold" which is an A20 now.
When I use the EDIT function, it is giving me a zero.

Thanks


WebFOCUS 7.7.02Windows
Output Formats: Excel, HTML, PDF
 
Posts: 82 | Registered: February 23, 2011Report This Post
Expert
posted Hide Post
You still bring the LL_AMT_SOLD column in:
 
TABLE FILE XXX
SUM
  COMPUTE X_AMT/D20.2 = IF type EQ 'Forward' THEN 0 ELSE LL_AMT_SOLD; NOPRINT
BY MAIN_SORT_COLUMN
PRINT
 equivsold
BY MAIN_SORT_COLUMN
ON MAIN_SORT_COLUMN SUBFOOT
" <+0><ST.X_AMT "
ON TABLE SET STYLE *
TYPE=SUBFOOT, STYLE=BOLD, HEADALIGN=BODY,$
ENDSTYLE
END
-EXIT



Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
<FreSte>
posted
Can something like this be used:


TABLE FILE CAR
  SUM
    COMPUTE DD/P20 MISSING ON = IF SALES LT 30000 THEN MISSING ELSE SALES;
    BY COUNTRY
    BY CAR
  ON TABLE SET NODATA Forward
  ON TABLE SUBTOTAL
END
 
Report This Post
Gold member
posted Hide Post
Thanks a lot Tom and FreSte for the responses. I will try to implement your response and will update the thread.


WebFOCUS 7.7.02Windows
Output Formats: Excel, HTML, PDF
 
Posts: 82 | Registered: February 23, 2011Report This Post
Gold member
posted Hide Post
Thanks a lot Tom and Freste for your sloutions.
They solved my issue.


WebFOCUS 7.7.02Windows
Output Formats: Excel, HTML, PDF
 
Posts: 82 | Registered: February 23, 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] subtotal on an alphanumeric field

Copyright © 1996-2020 Information Builders