Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm
No new posts Format record to remove Leading zeroes Learncoholic DFSORT/ICETOOL 14 Wed Apr 05, 2017 2:43 pm
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us