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] Reverse across

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Reverse across
 Login/Join
 
Member
posted
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, 2004Report This Post
Virtuoso
posted Hide Post
The McGyver technique perhaps?

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.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Virtuoso
posted Hide Post
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, 2007Report This Post
Virtuoso
posted Hide Post
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, 2007Report This Post
Member
posted Hide Post
Thanks all. Both the Mcgyver method and Dan's MATCH method worked.

I appreciate your assistance!


7.7.02 on Windows
 
Posts: 14 | Location: Minneapolis | Registered: August 24, 2004Report This Post
Expert
posted Hide Post
Alternate master with OCCURS would work as well.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report 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] Reverse across

Copyright © 1996-2020 Information Builders