Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to remove null indicators while unloading a table

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
Priyesh Tewari

New User


Joined: 24 Jun 2008
Posts: 7
Location: Pune

PostPosted: Mon Sep 01, 2008 3:13 pm    Post subject: How to remove null indicators while unloading a table
Reply with quote

Hi,
I am trying to unload data from table using HPUNLOAD utility. But null indicator appear in that unload file. Even after using COALESCE function The null indicator appear in the file. Can somebody help me on this
Back to top
View user's profile Send private message

wfs

New User


Joined: 04 Sep 2008
Posts: 1
Location: USA

PostPosted: Fri Sep 05, 2008 10:37 pm    Post subject: Reply to: How to remove null indicators while unloading a ta
Reply with quote

are you sure it's the NULL indicator you're seeing.

If the column in question is a string, then the COALESCE(colname,'XXX')

would result in a VARCHAR output column, so it would be preceded by the LENGTH attribute.

To get rid of the length use SUBSTR

SELECT
....
SUBSTR (COALESCE(colname,' ') || space(20), 1, 10) etc
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm
No new posts DB2 NULL Values display V S Amarendra Reddy DB2 3 Thu Sep 07, 2017 6:59 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us