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.
What is the best method of converting 1 row by 30 column hold file table to a 30 row by 2 column hold file table? I will need to perform additional computations on the table after the conversion.
Thanks!This message has been edited. Last edited by: <Kathryn Henning>,
You might be able to use a master that uses OCCURS
.... or ....
I gave a 30 minute lunchtime demo on a technique that may fit this requirement.
Consider this code and how it repeats the two columns that I want, and places a carriage return to separate each "line" of output. You could use a line feed char instead Using an alternative master gives me the columnar output.
EX -LINES 12 EDAPUT MASTER,TEMPDATA,CV,MEM
FILENAME=TEMPDATA, SUFFIX=FIX, $
SEGMENT=SEG01, SEGTYPE=S0, $
FIELD=KEYCOL, USAGE=A15, ACTUAL=A15, $
FIELD=DATA01, USAGE=A10, ACTUAL=A10, $
FIELD=DATA02, USAGE=A10, ACTUAL=A10, $
FIELD=DATA03, USAGE=A10, ACTUAL=A10, $
FIELD=DATA04, USAGE=A10, ACTUAL=A10, $
FIELD=DATA05, USAGE=A10, ACTUAL=A10, $
FIELD=DATA06, USAGE=A10, ACTUAL=A10, $
FIELD=DATA07, USAGE=A10, ACTUAL=A10, $
FIELD=DATA08, USAGE=A10, ACTUAL=A10, $
FILEDEF TEMPDATA DISK TEMPDATA.TXT
-RUN
-WRITE TEMPDATA Key Value data 01 data 02 data 03 data 04 data 05 data 06 data 07 data 08
-RUN
TABLE FILE TEMPDATA
PRINT
-REPEAT :Loop FOR &Cntr FROM 1 TO 8;
KEYCOL DATA0&Cntr.EVAL
COMPUTE CR/A1 = HEXBYT(13, 'A1');
-:Loop
ON TABLE HOLD AS HOLDDATA FORMAT ALPHA
END
-RUN
CMD TYPE HOLDDATA.FTM
EX -LINES 6 EDAPUT MASTER,HOLDDATA,CV,MEM
FILENAME=HOLDDATA, SUFFIX=FIX, $
SEGMENT=SEG01, SEGTYPE=S0, $
FIELD=KEYCOL, USAGE=A15, ACTUAL=A15, $
FIELD=DATAVAL, USAGE=A10, ACTUAL=A10, $
FIELD=CR, USAGE=A1, ACTUAL=A1, $
TABLE FILE HOLDDATA
PRINT DATAVAL
BY KEYCOL
ON TABLE SET PAGE NOLEAD
END
-RUN
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
There is no best method, it all depends on circumstance and preference.
One of my favourite for this is to use OVER and FORMAT WP:
APP HOLD BASEAPP
TABLE FILE CAR
PRINT COUNTRY AS '' RCOST/D7c AS '' DCOST/D7c AS ''
OVER COUNTRY AS '' RCOST/D7c AS '' DCOST/D7c AS ''
OVER COUNTRY AS '' RCOST/D7c AS '' DCOST/D7c AS ''
OVER COUNTRY AS '' RCOST/D7c AS '' DCOST/D7c AS ''
OVER COUNTRY AS '' RCOST/D7c AS '' DCOST/D7c AS ''
OVER COUNTRY AS '' RCOST/D7c AS '' DCOST/D7c AS ''
OVER COUNTRY AS '' RCOST/D7c AS '' DCOST/D7c AS ''
OVER COUNTRY AS '' RCOST/D7c AS '' DCOST/D7c AS ''
OVER COUNTRY AS '' RCOST/D7c AS '' DCOST/D7c AS ''
OVER COUNTRY AS '' RCOST/D7c AS '' DCOST/D7c AS ''
OVER COUNTRY AS '' RCOST/D7c AS '' DCOST/D7c AS ''
OVER COUNTRY AS '' RCOST/D7c AS '' DCOST/D7c AS ''
OVER COUNTRY AS '' RCOST/D7c AS '' DCOST/D7c AS ''
OVER COUNTRY AS '' RCOST/D7c AS '' DCOST/D7c AS ''
OVER COUNTRY AS '' RCOST/D7c AS '' DCOST/D7c AS ''
BY COUNTRY NOPRINT
ON TABLE HOLD AS MLINE FORMAT WP
ON TABLE SET PAGE NOLEAD
ON TABLE SET LINES 998
END
and then create an mfd over the output.
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007