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 a requirement in which the output needs to be csv ( the file will be fed to another system as a feed file). The users want header and a footer with the number of records in it. I have gone through other topics in the forum and saw the threads.
In this case, the csv file needs to be saved and when I save it, the footer and header disappear.
The following is my code:
FILEDEF testfile DISK testfile.CSV (APPEND -RUN
-WRITE testfile Country,Car,Model,Rcost,Dcost
TABLE FILE CAR PRINT RCOST DCOST BY COUNTRY BY CAR BY MODEL ON TABLE PCHOLD AS testfile FORMAT COMMA END -RUN -WRITE testfile There are &LINES Records in this file CMD TYPE testfile.csv
Thanks for reading.This message has been edited. Last edited by: sumant,
WebFOCUS 7.7.02Windows Output Formats: Excel, HTML, PDF
Thanks BabakNYC for the suggestion. I need the file saved on a physical directory, and the issue arises when I save it. As soon as I open the saved file, it loses all its headers and footers.
WebFOCUS 7.7.02Windows Output Formats: Excel, HTML, PDF
When I switch from PCHOLD to HOLD, the output is displayed on the screen. I need the output to be saved on my machine, as another system needs this file as input.
Am I missing something?
WebFOCUS 7.7.02Windows Output Formats: Excel, HTML, PDF
I just tested this in 8105 and got a csv file on my E: drive. It also displays on my screen because of CMD TYPE E:\testfile.csv.
FILEDEF testfile DISK E:\testfile.CSV (APPEND
-RUN
-WRITE testfile Country,Car,Model,Rcost,Dcost
TABLE FILE CAR
PRINT
RCOST
DCOST
BY COUNTRY
BY CAR
BY MODEL
ON TABLE HOLD AS testfile FORMAT COMMA
END
-RUN
-WRITE testfile There are &LINES Records in this file
CMD TYPE E:\testfile.csv
WebFOCUS 8206, Unix, Windows
Posts: 1853 | Location: New York City | Registered: December 30, 2015
The WF Reporting server has no idea where "YOUR" machine is. We FILEDEF with an address of: d:\ibi\apps\hold_area_for_files\
Your IBI install may be on a different drive.
If you APPEND right off the bat, the next time its run will retain the data from the previous run.
Store the file on the server, or, on a NFS drive, then FTP/EMAIL.
FILEDEF testfile DISK d:/ibi/apps/baseapp/testfile.csv
-RUN
-WRITE testfile Country,Car,Model,Rcost,Dcost
FILEDEF testfile DISK d:/ibi/apps/baseapp/testfile.csv (APPEND
-RUN
TABLE FILE CAR
PRINT
RCOST
DCOST
BY COUNTRY
BY CAR
BY MODEL
ON TABLE HOLD AS testfile FORMAT COMMA
END
-RUN
FILEDEF testfile DISK d:/ibi/apps/baseapp/testfile.csv (APPEND
-RUN
-WRITE testfile There are &LINES Records in this file
-CLOSE testfile
-EXIT
EDIT: Didn't have the FILEDEF coded correctly, works now...This message has been edited. Last edited by: Tom Flynn,
Thanks a lot Tom and babakNYC for your inputs. I understood that the web focus server has no idea of my machine. So I created a temporary folder in my C:\ibi\apps\testing and tried to run the procedure.
I get (FOC340) DIALOGUE MANAGER -WRITE FILE NOT ALLOCATED OR FILEDEF'ED
Is it related to permissions? I have not used filedef earlier and hence the trouble...
WebFOCUS 7.7.02Windows Output Formats: Excel, HTML, PDF