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.
"Saves the column headings in the first row of the output file. It produces a variable-length text file with fields separated by commas, and with character values enclosed in double quotation marks. Leading blanks are removed from numeric fields, and trailing blanks are removed from character fields."
However, I'm finding that only values that actually contain a comma in it get the double quotes around it. Is there some setting I need to set in order to get the double quotes around all character values?This message has been edited. Last edited by: ChannyS,
I just ran a focexec and did an on table hold format comt and the results were as stated. If the master shows the field as an alpha then it is enclosed in double quotes. I am running 7.6.4.
WF 8.2.01M 8.2.01M Reporting Server Windows 2012 Srvr R2 PDF,Excel, HTML Graphs - a lot of graphs
Posts: 60 | Location: Atlanta, GA | Registered: October 30, 2003
There seems to be no published standard for CSV format, and no accepted convention for representing null values. Given that state of affairs, the product folks apparently decided to ignore the MISSING attribute, to ensure that other programs opening the csv file would not choke. Thus, the output file represents NULL by " " (for alpha fields) or 0 (for numeric or date fields).
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
Jack - I think you meant this as a response to my other post. In any case, following Susannah's idea, I can use the MISSING to get myself the NA I want. But, that brings me back to this post! If they actually would put quotes around alpha fields then my numeric fields which have turned into alphas so that I can get NA's into them will have quotes around them. :-(
But, joining the two posts, in 768 if you construct an alpha field (with missing=on), containing either the numeric representation of your numeric field or a suitable representation of NA, then the former will be held w/o quotes, and Excel should render the field as either a number or NA, as required. Non?
- Jack Gross WF through 8.1.05
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
Well I guess it's a little cyclic here because I have a real alpha field that I'm expecting to always have quotes around it and that's not happening. So if that's continues working that way, then the missing field is fine (numeric or NA). However, if it works the way I expect it, then my numeric fields which need to have NA's so they are put out as Alpha's would have quotes...
'Hello,bye' is 1 field. you've defined 1 field, with special characters in it, so what you got is exactly what you asked for. you can't have a comma in the middle of a single field in a COMT unless its in quotes so that the interpreter knows its 1 field.
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
My question wasn't why 'Hello,Bye' got the quotes - it was why the others didn't when the documentation says all character fields get quotes around them. So when my real field has some data with commas and some without commas, only those values with commas get the quotes. This seems to be inconsistent with the documentation unless I am misunderstanding something?
FILEDEF HTEST1 DISK baseapp/htest1.csv
TABLE FILE CAR
PRINT CAR COUNTRY
COMPUTE FIELD_WITH_COMMA/A9 = 'HELLO,BYE';
ON TABLE HOLD AS HTEST1 FORMAT COMT
END
Actually, when I do it as a FILEDEF it works the same way for me. But when I PCHOLD it, then save the file in Excel, that's when I get the problem. Any suggestions?
then save the file in Excel, that's when I get the problem. Any suggestions?
Yes, do not save the file in Excel.
It is Excel that is removing the outer double quotes when it does an automatic import of a csv file. The reason the inner ones remain is because excel does not know how to handle them.
If you want to open the file in Excel them you must use the data/import external data functionality
OK - thanks. I'm just trying to figure out now how to make sure this thing doesn't automatically pop up in Excel. (Even though I changed the Windows File Extension association, it is still coming up in Excel).