IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to remove null indicators while unloading a table


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
Search our Forums:

Back to Top