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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
Transpose data
 Login/Join
 
<dksib>
posted
Hi all,

I need to create a generic fex that will take a MFD and put the Fieldnames in the first column and the extracted rows in thier own unique column.
fieldname trans1 trans2 trans3
NAME ABC DEF XYZ
QTY 123 465 256
AMT 5.2 3.4 7.3

At present I have 38 tables/reports that I need to do this to. Can someone help?
 
Report This Post
Expert
posted Hide Post
I don't have time to work this all out but you can use CHECK FILE filename HOLD and use FIELDNAME BY FLDNO to get all the columns and the order.

Then when you query the file, you will have to assign a column number to each column and invert the matrix.

Then you can join the two together by the fldno.

Just a couple of thoughts to get you started.


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
Master
posted Hide Post
or you can use OVER


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Report This Post
<dksib>
posted
Thanks for the options. I will try both and see what I get.
 
Report This Post
Virtuoso
posted Hide Post
This might help:
TABLE FILE SYSCOLUM
PRINT NAME 
-* required as this is a multipath file
IF SEGNO LE 5
IF TBNAME EQ CAR
ON TABLE HOLD
END
-RUN
-SET &TLINES=&LINES
TABLE FILE HOLD
SUM NAME
ON TABLE SAVE
END
-RUN
-READ SAVE &NAME.A66
DEFINE FILE CAR
CNTR/F8 WITH &NAME =CNTR+1;
COLNAME/A15 = 'Trans'|| FTOA(CNTR,'(F5)','A5');
END
TABLE FILE CAR
SUM
-SET &CNTR = 0;
-REPEAT :LOOP &TLINES TIMES
-SET &CNTR=&CNTR+1;
-SET  &OVER = IF &CNTR EQ &TLINES THEN ' ' ELSE 'OVER';
-READ HOLD &FLD.A66.
&FLD &OVER
-:LOOP
ACROSS COLNAME AS ''
END

The filename can also be a &var if necessary. (SYSCOLUM is a supplied mfd)


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
<dksib>
posted
Alan - Thanks it works for a limited number of rows. At present I am working with a max of 63 columns with around 7,000 rows. When I use this code it gives " (FOC153) VERB OBJECTS TIMES RETRIEVED COLUMNS EXCEEDS MAXIMUM". What is the limit of using OVER 15??

David
 
Report This Post
Virtuoso
posted Hide Post
The message says it all.

There is not a limit, per se, on OVER, but in conjunction with the number of values retrieved (which will be the number of columns you are getting) you have hit a limit somewhere, but not sure what it is.

Perhaps you can run with limited vales and APPEND files together.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders