Focal Point Banner


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. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at myibi@ibi.com and provide your corporate email address, company, and name.


Connect to myibi

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] CSV Output
 Login/Join
 
Member
posted
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
 
Posts: 8 | Registered: June 13, 2008Report This Post
Silver Member
posted Hide Post
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
 
Posts: 33 | Registered: July 31, 2008Report This Post
Member
posted Hide Post
SET NODATA=''



FOCUS 7.2.0S1
Mainframe - MVS 390
Excel, Flat file

Italy
 
Posts: 25 | Registered: June 23, 2009Report This Post
Member
posted Hide Post
@ 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
 
Posts: 8 | Registered: June 13, 2008Report This Post
Gold member
posted Hide Post
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.
 
Posts: 83 | Registered: February 26, 2009Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders