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.
I have a small issue while using ACROSS Let me Illustrate that with an eg: Please see the following code
TABLE FILE CAR SUM CNT.SEATS AS 'StatusCnt' BY MODEL AS 'Business' BY CAR AS 'Company' ACROSS COUNTRY AS '' ON TABLE SET PAGE-NUM OFF ON TABLE SET PAGE NOLEAD END
And this code produces an o/p something like this
ENGLAND FRANCE ITALY JAPAN W GERMANY Business Company 100 LS 2 DOOR AUTO AUDI 0 0 0 0 1 2000 4 DOOR BERLINA ALFA ROMEO 0 0 1 0 0 2000 GT VELOCE ALFA ROMEO 0 0 1 0 0
But I want that extra space which is in between the line1 and line2 of the o/p to be removed, i mean the o/p shld look something like this :
Business Company ENGLAND FRANCE ITALY JAPAN W GERMANY 100 LS 2 DOOR AUTO AUDI 0 0 0 0 1 2000 4 DOOR BERLINA ALFA ROMEO 0 0 1 0 0 2000 GT VELOCE ALFA ROMEO 0 0 1 0 0
All the column names should be in the same line and i want to know how this can be done, i know this problem is because of using ACROSS.
Please suggest me a way to resolve this problem. Thanks
7.6.4 Unix & Windows Excel,HTML,PDF,PPT,AHTML
Posts: 68 | Location: Hyderabad | Registered: March 18, 2008
SET ASNAMES=ON
-RUN
TABLE FILE CAR
SUM
CNT.SEATS AS 'StatusCnt'
BY MODEL AS 'Business'
BY CAR AS 'Company'
ACROSS COUNTRY AS ''
ON TABLE SET PAGE-NUM OFF
ON TABLE SET PAGE NOLEAD
ON TABLE HOLD AS MYFILE FORMAT ALPHA
END
-RUN
TABLE FILE MYFILE
PRINT *
END
WF 7.6.11 Output: HTML, PDF, Excel
Posts: 123 | Location: UK | Registered: October 09, 2003
Thanks a ton tewy that worked... And could you please lemme knw why you used 1) RUN before both the table requests, does this have anything to do with the performance?? 2) FORMAT ALPHA, how does that influence the format of the o/p??
7.6.4 Unix & Windows Excel,HTML,PDF,PPT,AHTML
Posts: 68 | Location: Hyderabad | Registered: March 18, 2008
1) In this particular instance, you don't need the -RUN. It is normally used to execute the focstack prior to running another Dialogue Manager command that would need the results of the previous FOCUS command.
2) In this particular instance, the format is irrelevant and the output will be the same. However, those of us who create a lot of hold files with WebFOCUS find that FORMAT ALPHA tends to be more flexible than the default format BINARY.
1) Habit! I find when reading the code -RUN statements break it up to make it easier to read (personal preferance). Plus in older versions of WebFOCUS when I used to (on occasion) watch the output of SET ECHO=ALL in the command window whilst waiting for a result, -RUN made it put the number of lines of output etc under each table request, without the -RUN you just got all your code, followed by all the results. Made error trapping easier.
2) Using SET ASNAMES=ON and FORMAT ALPHA changes the fieldname of your STATUSCNT to STATUSCNT and the relevant country.
WF 7.6.11 Output: HTML, PDF, Excel
Posts: 123 | Location: UK | Registered: October 09, 2003
I had problems retaining the column totals in the alpha hold file. To over come this i calculated the totals just before printing the contents but the totals came up in two lines sm thing like this
Total 138,134 4 1 4 2 7
so could you please help me out on this..and i want the final o/p to be out in excel , so do we have any approaches on getting the totals in excel??Please suggest. TIA
SET ASNAMES=ON -RUN TABLE FILE CAR SUM CNT.SEATS AS '' BY DEALER_COST AS 'Business' BY CAR AS 'Company' ACROSS COUNTRY AS '' ON TABLE SET PAGE-NUM OFF ON TABLE SET PAGE NOLEAD ON TABLE HOLD AS MYFILE FORMAT ALPHA END -RUN TABLE FILE MYFILE PRINT * ON TABLE COLUMN-TOTAL AS 'Total' END
7.6.4 Unix & Windows Excel,HTML,PDF,PPT,AHTML
Posts: 68 | Location: Hyderabad | Registered: March 18, 2008
Your problem is because the first column in your print is a numeric column for which WebFOCUS will provide a total, if the column were alpha you'd be able to have the word TOTAL and the total values on the same line.
Rearrange your columns so there is an alpha field as your first sort field.
WF 7.6.11 Output: HTML, PDF, Excel
Posts: 123 | Location: UK | Registered: October 09, 2003
Here's a way, but there's a tradeoff -- You get TOTAL and the total values on a single line, at the cost of indenting the entire report a bit.
DEFINE FILE CAR NADA/A1=; END TABLE FILE CAR SUM CNT.SEATS AS '' BY NADA AS '' BY DEALER_COST BY CAR ACROSS COUNTRY AS '' ON TABLE SUMMARIZE ENDThis message has been edited. Last edited by: j.gross,
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
DEFINE FILE CAR V_SC/A100 = MODEL || COUNTRY; V_AC/A100 = IF V_SC EQ 'M1' THEN 'King' ELSE IF V_SC EQ 'M2' THEN 'Queen' ELSE IF V_SC EQ 'M3' THEN 'Jose' ELSE IF V_SC EQ 'M4' THEN 'Alpha' ELSE 'Beta'; Model/A100 = MODEL; Country/A100 = COUNTRY; END
TABLE FILE CAR SUM CNT.V_SC AS '' BY Model BY Country ACROSS V_AC AS '' ON TABLE HOLD AS MYFILE FORMAT ALPHA END
TABLE FILE MYFILE PRINT * ON TABLE COLUMN-TOTAL AS 'Total' END
Try this this stil din help me out of the problem my first by is a alpha nw.
7.6.4 Unix & Windows Excel,HTML,PDF,PPT,AHTML
Posts: 68 | Location: Hyderabad | Registered: March 18, 2008