Focal Point
[SOLVED] CSV Output

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

September 18, 2009, 02:57 AM
Ajay kumar
[SOLVED] CSV Output
Hi all,
In the CSV ouput if there exists no data for a particular column then it diplays 0 for numeric columns and ''(BLANK) for alphanumeric columns. I want blank to be displayed for numeric columns too. I searched in the forums, but in vain.
Please find below the sample code.
Query:
SELECT XYZ,ABC from dual where 1 =2 ;
SO the above query fetches no data.

Report:
TABLE FILE SQLOUT
PRINT
*
ON TABLE PCHOLD FORMAT COMT
END

OUTPUT:
0 0(If XYZ and ABC are numeric & Date columns,
it is BLANK if they are ALPHANUMERIC columns)

This message has been edited. Last edited by: Kerry,


Webfocus 714
Windows XP
HTML,EXCEL,PDF,GIF
September 18, 2009, 03:18 AM
SureshKumar
Try converting numeric column to alphanumeric.
Am not sure if this is the only solution.

COMPUTE XYZ_A/A10 = IF XYZ EQ 0 THEN ' ' ELSE EDIT(XYZ);


Webfocus 8002M, 8009
OS: Windows7
September 18, 2009, 03:22 AM
ac1
SET NODATA=''



FOCUS 7.2.0S1
Mainframe - MVS 390
Excel, Flat file

Italy
September 18, 2009, 05:20 AM
Ajay kumar
@ ac1: I tried this earlier itself, was not working.

@ Suresh Kumar : This is working thanks a lot.

Is this the only solution ? for this


Webfocus 714
Windows XP
HTML,EXCEL,PDF,GIF
September 18, 2009, 08:39 AM
Dr. Nick
Hi Ajay,
To display a blank when a numeric is zero (0) use the Zero Suppress feature. This feature is activated by appending an "S" to the field format. For example, F5.2S. This can be done in the Master or Define, based on either a permanent or temporary needs, respectively.
Hope this helps,
Nick


WebFOCUS 7.7.03 & 8.0.7
Windows
HTML, Excel, PDF, etc.
Also, using Maintain, etc.