[SOLVED] How to remove quotation marks for alphanumeric fields from a report’s .txt
We need a report that its output data can be uploaded into another system.
We have tried several output file formats (such as: COMT), run it and saved it as .txt file. Then, after open the .txt file, all columns are separated by commas. The problem is that all alphanumeric fields are enclosed in quotation marks. We need help to get rid of the double quotations.
Anyone can suggest how? ThanksThis message has been edited. Last edited by: TechLights,
7703 on Linux, Windows ReportCaster PDF, HTML, Excel, AHTML, and CSV
February 10, 2012, 10:57 AM
njsden
TechLights, having alphanumeric fields enclosed by quotes is a valid convention for comma-separated-values files and WebFOCUS is adhering to those.
Why can't the other system consume it? is it a custom-load process someone built? If that system "understands" .csv files, it should have no problem parsing the file and getting the fields, quotes and all.
Now, back to you actual request I don't know if there is a setting in WebFOCUS that may make those quotes optional. If that is an issue for the downstream system, you may need to do a poor-man's .csv implementation ...
DEFINE FILE BLAH
LONG_LINE/A500 = FIELD1 || ', ' || FIEL2 || ',' ...;
END
TABLE FILE BLAH
PRINT LONG_LINE
ON TABLE HOLD AS HDATA FORMAT ALPHA
END
TABLE FILE CAR
SUM
DEALER_COST
BY COUNTRY
BY CAR
ON TABLE HOLD AS HLD1 FORMAT DFIX DELIMITER ',' HEADER NO
END
-RUN
-TYPE .........................
!TYPE HLD1.FTM
February 13, 2012, 03:37 PM
TechLights
Thanks a lot for all of your responds! DFIX works.
One thing left to be done – it is:
When run the report, it will show some WF report messages before the really columns data. All columns data are separated by commas and alphanumeric fields are not enclosed in quotation marks – the result are exactly we want.
These message are as below.
How to show the result without displaying those seven lines of WF messages? Thanks
=================================================================== Your request did not return any output to display. Possible causes: - No data rows matched the specified selection criteria. - Output was directed to a destination such as a file or printer. - An error occurred during the parsing or running of the request. ________________________________________
0 NUMBER OF RECORDS IN TABLE= 134 LINES= 134 0 NUMBER OF RECORDS IN TABLE= 134 LINES= 134 STUDENTID,LASTNAME,CLASSNAME,SSNS ASMITH0001,Smith,C_USCG_BBOC-126,, . . (report continues)
7703 on Linux, Windows ReportCaster PDF, HTML, Excel, AHTML, and CSV
February 13, 2012, 07:32 PM
N.Selph
The actual hold file you create won't have all those preliminary messages. You are showing the message viewer out file which displays because there is nothing else to display.
You do have a FILEDEF HLD1 DISK wherever\whatever (OR APP HOLDDATA ....) statement in your fex don't you?