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 how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm
No new posts Join of more than one table dibyendumandal11111 DB2 6 Mon Feb 13, 2017 11:36 pm
No new posts VALIDATE NULL VALUE IN DB2 CASE STATE... useit DB2 5 Thu Feb 09, 2017 4:34 pm
No new posts Remove junk values in a file and rite... KP1125 DFSORT/ICETOOL 2 Wed Jan 25, 2017 9:58 pm
No new posts Sort Card to Remove Duplicate records... raj4neo SYNCSORT 2 Wed Jan 25, 2017 4:44 am


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