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] Possible to drop an across column?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Possible to drop an across column?
 Login/Join
 
Guru
posted
DEFINE FILE CAR
MY_SALES/D12.2 = IF COUNTRY EQ 'ENGLAND' THEN 0 ELSE RETAIL_COST;
END
TABLE FILE CAR
SUM MY_SALES
BY CAR
ACROSS COUNTRY
-******WHERE COUNTRY NE 'ENGLAND';
ON TABLE SET STYLE *
END
  


Pretend the above report is the Car Sales by Country and there are non-zero figures in other countries for the Brit cars except in England.
Is it possible to drop the column by across-value = "England"? I need every bit of space for my report.

Thanks,

Hua

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


Developer Studio 7.6.11
AS400 - V5R4
HTML,PDF,XLS
 
Posts: 305 | Location: Winnipeg,MB | Registered: May 12, 2008Report This Post
Expert
posted Hide Post
Do you need to keep the English cars ?

If not then just add a WHERE MY_SALES NE 0

Otherwise

TABLE FILE CAR
PRINT COMPUTE
      CNTR/I9 = LAST CNTR + 1 ; NOPRINT
      COMPUTE
      FOR_CAR/A23 = IF CNTR EQ 1 THEN '''' | CAR | '''' ELSE 'OVER ''' | CAR | '''' ;
BY CAR NOPRINT
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE SAVE AS FEX_CODE
END
-RUN
DEFINE FILE CAR
MY_SALES/D12.2 = IF COUNTRY EQ 'ENGLAND' THEN 0 ELSE RETAIL_COST;
END
TABLE FILE CAR
SUM MY_SALES
ACROSS COUNTRY
BY CAR ROWS
-INCLUDE FEX_CODE
WHERE MY_SALES NE 0
ON TABLE SET STYLE *
END

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


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Guru
posted Hide Post
Waz,

I see your codes are working the way I wanted.

I couldn't digest the techques you're using here and hope you will help me out:
1. You use ACROSS before BY that I thought is not allowed. Why such a way?
2. How significant is the keyword "ROWS"?
3. How does INCLUDE inserting data into the CAR file? - as a row or column of cars in quotes? The cars displayed on the report is coming from the CAR file or from FEX_CODE?

When I commented out INCLUDE line, I got syntax error for the verb FOR and couldn;t figure out where in the code has this verb. Are you using FML to drop the column? I may not be able to utilize this technique at this moment because I not quite familiar with FML, but sure helpful when I know more about it.

Thanks.

Hua

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


Developer Studio 7.6.11
AS400 - V5R4
HTML,PDF,XLS
 
Posts: 305 | Location: Winnipeg,MB | Registered: May 12, 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] Possible to drop an across column?

Copyright © 1996-2020 Information Builders