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 need the total no of recors to be displayed in csv.Using footing and headings doesn ot work. Is there any other way to bring header and total no of records (at the bottom).
Thanks!This message has been edited. Last edited by: Kerry,
You want header and footer records in a CSV file? Then your answer may lay in filedefing your output file ahead of the report in APPEND mode, then write your header to the file, run the report into the file followed by writing the footer.
To obtain record counts to go into the header, you would need to preprocess the data to obtain the system variable for the number of records.
If you know WebFOCUS and dialogue manager then this should be easy.
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
Create the CSV as COM not COMT Put the value of &RECORDS into an other variable Filedef the generated file using (APPEND -WRITE the extra data required
e.g. TABLE FILE blablabla PRINT col1 col2 col3 etc. ON TABLE HOLD FORMAT COM END -RUN -SET &CSVROWS = &RECORDS; FILEDEF HOLD DISK HOLD.CSV (APPEND -RUN -WRITE HOLD "col1","col2","col3",'etc." -WRITE HOLD RECORDS= &CSVROWS
Or whatever information is required by the application you are creating the file for.
Thanks for the suggestions. I tried the bewlo code :
TABLE FILE CAR
PRINT
COUNTRY
CAR
ON TABLE HOLD AS HLD1
END
TABLE FILE HLD1
PRINT
*
ON TABLE PCHOLD FORMAT COM
END
-RUN
-SET &CSVROWS = &RECORDS;
FILEDEF HOLD DISK HLD1.CSV (APPEND
-RUN
-WRITE HOLD "COUNTRY","CAR"
-WRITE HOLD RECORDS= &CSVROWS
The item you are getting wrong is not understanding the difference between PCHOLD and HOLD. Reread JG's post, go look at a manual or read other recent posts about it to understand. Then apply what you learn.
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
May I suggest you use &LINES and not &RECORDS to determine the number of lines in the hold file? &RECORDS is a count of the number of rows read and not the number of rows in the output. With a PRINT there is no difference between &RECORDS and &LINES, but with a SUM there is.
FILEDEF HLD1 DISK HLD1.CSV (APPEND
-RUN
-WRITE HLD1 "COUNTRY","CAR"
TABLE FILE CAR
PRINT
COUNTRY
CAR
ON TABLE HOLD AS HLD1 FORMAT COM
END
-RUN
-SET &CSVROWS = &LINES;
-WRITE HLD1 RECORDS= &CSVROWS
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server