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.
Hi all, I'm drawing a blank. I'm sure I've done this before, but I can't remember how. Basically I need a segment of columns to be merged to one column. For example:
TABLE FILE CARDATA
PRINT
CAR1
CAR2
CAR3
BY YEAR
WHERE YEAR EQ '2010'
END
Would look something like this:
YEAR CAR1 CAR2 CAR3 2010 VW BMW FORD
How do I get it to look like this?
YEAR HEADER CAR 2010 CAR1 VW 2010 CAR2 BMW 2010 CAR3 FORD
I might add that I have used the OVER command but it doesn't seem to be keeping layout after I HOLD it and report from the HOLD file.This message has been edited. Last edited by: Kerry,
7.7.02 on Windows
Posts: 14 | Location: Minneapolis | Registered: August 24, 2004
It would allow you to "multiply" your record as many times as needed (3 in your case). You can then DEFINE a virtual field which would take the value in CAR1, CAR2 or CAR3 depending on the record COUNTER.
And your are correct about the OVER command. It is for display only. It doesn't translate into anything at all for a hold file. There are MANY references in the forum with regard the the McGyver technique referenced by nsjden, which is exactly what you need to convert columns to rows.
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
If you have a specific number of 'CAR' columns, you might be able to do something like this:
DEFINE FILE CARDATA
HEAD1/A4 = 'CAR1';
HEAD2/A4 = 'CAR2';
HEAD3/A4 = 'CAR3';
END
-*
MATCH FILE CARDATA
BY YEAR
BY HEAD1 AS 'HEADER'
BY CAR1 AS 'CAR'
RUN
FILE CARDATA
BY YEAR
BY HEAD2 AS 'HEADER'
BY CAR2 AS 'CAR'
AFTER MATCH HOLD OLD-OR-NEW
RUN
FILE CARDATA
BY YEAR
BY HEAD3 AS 'HEADER'
BY CAR3 AS 'CAR'
AFTER MATCH HOLD OLD-OR-NEW
END
WebFOCUS 7.7.05
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007