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 been trying to find out if there is a way to generate a CSV report without double quotes around the text fields. I am trying to generate a report that I can load directly to another database via a web portal and am trying to avoid having to open each file and re-format it after it's been generated.
you could just generate a .txt file output [ON TABLE HOLD FORMAT ALPHA] and having FILEDEF'd it as FILEDEF THING DISK C:/..../THING.TXT
and create your own string, inserting a comma after every field, TABLE FILE CAR SUM SALES BY COUNTRY BY CAR ON TABLE HOLD FORMAT ALPHA END -RUN DEFINE FILE HOLD output/A100=SALES ||','||COUNTRY ||','||CAR ; END TABLE FILE HOLD PRINT output ON TABLE HOLD AS THING FORMAT ALPHA END -- that sort of thing
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
Building on Alex's solution: ON TABLE HOLD FORMAT ... DFIX DELIMITER delim [ENCLOSURE enclose] [HEADER header] [PRESERVESPACE spaces]..delimited file delim: TAB .... to create tab-delimited data delim: characters .... up to 30 characters as delimiters delim: hex-value .... value for non-printable characters enclose: character .... up to four printable characters to enclose the data enclose: '''' .... four single quotes produces a single quote header: NO .... [default] no title line is included header: YES .... a title line with fieldnames is included spaces: NO .... [default] leading and trailing blank spaces are removed from output spaces: YES .... leading and trailing blank spaces are left in output The spaces option was added in 7.7.04 From the WebFOCUS Keysheet, around page 59.
WebFOCUS 8.0.2, FOCUS since 1977 - John@Aviter.com PDF , Excel, FOCUS, Author of the Keysheets and Dates book. www.Aviter.com
Wow, all of this has been really helpful. I've scoured around looking for tidbits like this before posting here. It's amazing how now knowing a small bit of code has such a big impact. Thanks all!
The DFIX works great so long as I run it locally. As soon as I run the procedure through report caster, I get the double quotes again. I've tried different output formats - DFIX, .CSV (which is what the file is supposed to be), ALPHA, COMT. All come out with quotes or lack any formatting. So I am stuck again. I wish there was a way to run the report without having to specify a report output format.
What I don't understand is why you are required to get rid of the quotes when the standard for CSV actually makes provision for them to be used (what if you have a comma as part of your data?).
Whichever database or data load facility you're using should be able to read your CSV file, quotes or no quotes ...
I set up a simple fex that creates a DFIX file. I then created a ReportCaster schedule to execute this fex and selected DFIX as Report Format and "test.csv" as file name. I receive an email with an attachment called test.csv. I see no double quotes when I open it in a text editor.
TABLE FILE CAR
PRINT SALES
BY COUNTRY
BY CAR
BY MODEL
ON TABLE PCHOLD AS FMH001 FORMAT DFIX DELIMITER ,
END
Originally posted by Francis Mariani: I set up a simple fex that creates a DFIX file. I then created a ReportCaster schedule to execute this fex and selected DFIX as Report Format and "test.csv" as file name. I receive an email with an attachment called test.csv. I see no double quotes when I open it in a text editor.
TABLE FILE CAR
PRINT SALES
BY COUNTRY
BY CAR
BY MODEL
ON TABLE PCHOLD AS FMH001 FORMAT DFIX DELIMITER ,
END