Focal Point
[CLOSED] How To Remove Double-Quotes from COMT Files.

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/7707046876

September 29, 2015, 09:57 AM
Doug
[CLOSED] How To Remove Double-Quotes from COMT Files.
How do I remove the Double-Quotes from COMT Files?

What needs to be added to remove the double-quotes from the COMT output?

Code
TABLE FILE CAR
SUM DCOST RCOST BY CAR BY MODEL
ON TABLE PCHOLD FORMAT COMT
END

Desired Results:
CAR,MODEL,DEALER_COST,RETAIL_COST
ALFA ROMEO,2000 4 DOOR BERLINA,4915,5925
ALFA ROMEO,2000 GT VELOCE,5660,6820
ALFA ROMEO,2000 SPIDER VELOCE,5660,6820


Regular Results:
"CAR","MODEL","DEALER_COST","RETAIL_COST"
"ALFA ROMEO","2000 4 DOOR BERLINA",4915,5925
"ALFA ROMEO","2000 GT VELOCE",5660,6820
"ALFA ROMEO","2000 SPIDER VELOCE",5660,6820

I understand the reasoning behind the use of double-quotes in CSV files. But, my particular application doesn't want them.

Thanks, Doug

This message has been edited. Last edited by: <Kathryn Henning>,




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
September 29, 2015, 10:26 AM
Damien
Hi Doug,
Just use this syntax instead of the COMT

ON TABLE HOLD FORMAT DFIX DELIMTER , HEADER YES

You can use whatever you want as DELIMITER


Damien
WF 8202
DB : NETEZZA, MSSQL, DB2, ORACLE
Output : ALL
September 29, 2015, 11:09 AM
Doug
Thanks for pointing me in the right direction the following works fine. I was stuck on COMT :
ON TABLE PCHOLD AS myfile FORMAT DFIX DELIMITER , HEADER YES

This message has been edited. Last edited by: Doug,
September 29, 2015, 12:01 PM
Doug
Unfortunately, there's always some give and take. While "ON TABLE PCHOLD AS DFIX&YYMD FORMAT DFIX DELIMITER , HEADER YES" works, I lost the ability to name that file (DFIX&YYMD) as is available with COM and COMT. It ignores the AS DFIX&YYMD and creates "WFServlet.ibfs" which, of course, I can SAVE AS anything I want. But, this will be done in RC.

Any thoughts on that?

This message has been edited. Last edited by: Doug,
September 30, 2016, 09:11 AM
Doug
Good answer. And it's better yet.

I stated that "I lost the ability to name that file".

However, the name can be done quite nicely via ReportCaster Bursting with a Dynamic Distribution List.

I knew the solution was in the cobwebs of my brain and found it when I searched for "How To Remove Quotes from COMT"... Smiler




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206