Focal Point
[CLOSED] Alphanumeric incorrect format in COMT

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

May 16, 2014, 10:35 AM
Padmavathy
[CLOSED] Alphanumeric incorrect format in COMT
Hi,
I have tried generating a report in .csv format and using COMT format.

Code Snippet:

SELECT '001' AS SAMP FROM DUAL;

TABLE FILE SQLOUT
PRINT
*
ON TABLE HOLD AS SAMP1
END


TABLE FILE SAMP1
PRINT
*
ON TABLE PCHOLD FORMAT COMT
END


In output .csv file '001' has been displayed as '1'. But I need to generate report with '001' in .csv format.
Could someone please help me on this to solve the issue.

Thanks & Regards
Padmavathy S

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


WebFOCUS 7.6
Windows, All Outputs
May 16, 2014, 10:59 AM
Francis Mariani
If the file is opened in Excel, the 001 is converted to 1 automatically. Open the file in a text editor and you will find that the values are indeed "001".

Try this test:

SQL
SELECT '001' AS SAMP FROM CAR;
TABLE ON TABLE HOLD AS SAMP1
END

?FF SAMP1

TABLE FILE SAMP1
PRINT
*
ON TABLE HOLD AS BASEAPP/CSSOUT FORMAT COMT
END


Look for file cssout.csv in folder C:\ibi\apps\baseapp


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
May 16, 2014, 11:26 AM
Francis Mariani
"SAMP"
"001"
"001"
"001"
"001"
"001"



Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
May 20, 2014, 03:44 AM
Padmavathy
Thank you for your response.
So as a result when we generate COMT format file , we should open that as a text file and should not open in excel to get correct text format ?


WebFOCUS 7.6
Windows, All Outputs