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 have the following data in my input file: col1 col2 col3 (This line is not present in the file. I have shown it for convinience sake) A1 B1 C1 A2 B2 C2 A3 B3 C3
Now, I want my output as follows:
col1 A1 col2 B1 col3 C1
-----Page break-------
col1 A2 col2 B2 col3 C2
-----Page break-------
col1 A3 col2 B3 col3 C3
Please provide some information/link where I can dig into!! Thanks!This message has been edited. Last edited by: Kerry,
Prash1983, I'm not familar with Mainframe WebFOCUS but here is an example I worked up on Windows using a DEFINE with the CAR data source. Not sure I would recomend this with a large file and if its something that needs to run quick due to the DEFINE. Also, I'm using < br > for the new lines and that's probably only going to work for HTML. Also, I had to strip some of the code to get it to display. The quotes and < from the SUBHEAD field are removed. Hope this helps.
DEFINE FILE CAR
FLIST/A256V='Length: '|EDIT(CAR.SPECS.LENGTH)|'<br>'|'Width: '|EDIT(CAR.SPECS.WIDTH)|'<br>'|'Height '|EDIT( CAR.SPECS.HEIGHT)|'<br>';
END
TABLE FILE CAR
BY 'CAR.SPECS.LENGTH' NOPRINT
ON CAR.SPECS.LENGTH SUBHEAD
" <CAR.SPECS.FLIST "
HEADING
"Rows displayed as columns"
FOOTING
""
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='ARIAL',
SIZE=9,
$
TYPE=TITLE,
STYLE=BOLD,
$
ENDSTYLE
END
This message has been edited. Last edited by: Don Garland,
If you include code in the thread, please put it between then [ code ] and [ /code ] tags, otherwise pieces of your code might be interpreted as html....
Having said that, the question could also be answered with the following:
DEFINE FILE CAR
COUNTER WITH CAR = COUNTER + 1;
END
TABLE FILE CAR
PRINT CAR
OVER MODEL
OVER SEATS
BY COUNTER NOPRINT PAGE-BREAK
END
Hope this helps ...
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
Thanks GamP and Don!! Solution works! Now, I have one more question here. Say, I need to add one more field and make the O/P as follows: col1 A1 col2 B1 col3 C1 col4 D1 (value of D1 being 1 of 3)
-----Page break-------
col1 A2 col2 B2 col3 C2 col4 D2 (value of D2 being 2 of 3)
-----Page break-------
col1 A3 col2 B3 col3 C3 col4 D3 (value of D3 being 3 of 3)
I checked the documentation and found that TABPAGENO & TABLASTPAGE are used for numbering, but they are used to add page numbers in HEADING OR FOOTING. How can I achieve this O/P ?
Currently I can get the output as follows: Col4 D4 (Value of D4 is "1 OF ????") I want to fill this "????" with total number of pages which can change depending on file's data. Number of pages should change w.r.t. the "col1" value. Thanks!
Hi Guys! I did it but the way is very trivial and dissatisfying. 1) I first did "SUM CNT.A1" on the table and put the result in HOLD table. 2) Defined a new variable in the HOLD file's definition to populate the value of "SUM CNT.A1" 3) Stored the result in new HOLD table. 4) Joined the HOLD table with original table. Now, I already had the "TOTAL COUNT" value. 5) Reported in XLS as required.
Please let me know of a better solution, if you come across any. Thanks GamP & Don once again!
Something like this perhaps? It looks easier than what you described and it only goes through the data once.
DEFINE FILE CAR
COUNTER/I4 WITH CAR = COUNTER + 1;
TO/I4 = 1;
END
TABLE FILE CAR
SUM TO NOPRINT
PRINT CAR
OVER MODEL
OVER SEATS
OVER COMPUTE TXT/A12 = LJUST(12,FTOA(COUNTER,'(F4)','A4') | ' of ' | FTOA(C1,'(F4)','A4'),'A12'); AS 'Page'
BY COUNTER NOPRINT PAGE-BREAK
ON TABLE SET PAGE OFF
END
Hope this helps ...
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007