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've seen a number of issues where people ask to display information horizontally, but the answers don't seem to do what I think the poster is asking. I can't find much relief in the help documentation either.
I am trying to do something as simple as print all the distinct cars out horizontally. So that my results will look like: CAR JAGUAR JENSEN TRIUMPH DATSUN TOYOTA ALFA ROMEO
Rather that the normal output of: CAR JAGUAR JENSEN TRIUMPH DATSUN TOYOTA ALFA ROMEO
Thanks for any help you can offer.This message has been edited. Last edited by: Kevin Patterson,
Kevin Patterson Appalachian State University WebFOCUS 7.7.03 Windows, All Outputs
TABLE FILE CAR
SUM
CAR
BY CAR NOPRINT
ON TABLE HOLD AS HCAR FORMAT ALPHA
END
DEFINE FILE HCAR
ALL_CAR/A200V = ALL_CAR || (' ' | CAR);
END
TABLE FILE HCAR
SUM
MAX.ALL_CAR
END
The first TABLE FILE is not required - it's to ensure the data is in the correct order for the DEFINE and (I think) to ensure there are unique data values.
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
Thanks Waz, I'm still confused though. Do you mean something like: TABLE FILE CAR PRINT CAR ACROSS COUNTRY END
That gives me a matrix. I just want one line of output. So now that we have country in there, Really what I'd like to do is to show something like all the cars in a country:
ITALY ALFA ROMEO MASERATI W GERMANY AUDI BMW JAPAN DATSUN TOYOTA ENGLAND JANGUAR JENSEN TRIUMPH FRANCE PEUGEOT
Kevin Patterson Appalachian State University WebFOCUS 7.7.03 Windows, All Outputs
Riffing off of both of your posts I came up with (data isn't quite correct but it gives me the output I want):
TABLE FILE CAR PRINT COUNTRY CAR BY COUNTRY NOPRINT ON TABLE HOLD AS HCAR FORMAT ALPHA END
TABLE FILE HCAR SUM COMPUTE ALL_CAR/A200V = ALL_CAR || (' ' | CAR); BY COUNTRY END
To show this: COUNTRY ALL_CAR ENGLAND TRIUMPH FRANCE TRIUMPH PEUGEOT ITALY TRIUMPH PEUGEOT MASERATI JAPAN TRIUMPH PEUGEOT MASERATI TOYOTA W GERMANY TRIUMPH PEUGEOT MASERATI TOYOTA BMW
Is there a way to clear out that compute on each iteration it goes through.
Kevin Patterson Appalachian State University WebFOCUS 7.7.03 Windows, All Outputs
SET ASNAMES=ON
SET HOLDFORMAT=ALPHA
SET HOLDLIST=PRINTONLY
TABLE FILE CAR
PRINT
COUNTRY
CAR
BY COUNTRY NOPRINT
BY CAR NOPRINT
ON TABLE HOLD AS HCAR FORMAT ALPHA
END
DEFINE FILE HCAR
ALL_CAR/A200V = IF COUNTRY NE LAST COUNTRY THEN CAR ELSE ALL_CAR || (' ' | CAR);
END
TABLE FILE HCAR
SUM
MAX.ALL_CAR
BY COUNTRY
END
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
SET ASNAMES=ON
SET HOLDFORMAT=ALPHA
SET HOLDLIST=PRINTONLY
TABLE FILE CAR
SUM COMPUTE CAR_CNT/I9 = CNT.CAR ; NOPRINT
BY COUNTRY
PRINT COMPUTE ALL_CAR/A200V = IF COUNTRY NE LAST COUNTRY THEN CAR ELSE ALL_CAR || (' ' | CAR);
COMPUTE CNTR/I9 = IF COUNTRY EQ LAST COUNTRY THEN LAST CNTR + 1 ELSE 1 ; NOPRINT
BY COUNTRY
WHERE TOTAL CAR_CNT EQ CNTR
END
Definitely. I hadn't run across the LAST command, which I see I can use to figure out when to concatenate the field to the previous information or start over with the current value. Thanks again.
Kevin Patterson Appalachian State University WebFOCUS 7.7.03 Windows, All Outputs