Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Unload from Table with DSNTIAUL delimited by pipe symbol

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

New User


Joined: 16 May 2005
Posts: 54

PostPosted: Wed Dec 17, 2014 6:25 pm    Post subject: Unload from Table with DSNTIAUL delimited by pipe symbol
Reply with quote

Hi All,

I am trying to Unload few fields of a DB2 table using DSNTIAUL. I need to
unload into a flat file in a pipe(|) separated format.

I have used a query similar to the below one for unloading.

Select Empno
,char('|')
,Emp_name
,char('|')
,Emp_addr
,char('|')
,Emp_city
from table

I want to put "NULL", if any of the column value contains NULL

Thanks in advance.
Back to top
View user's profile Send private message

Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1329
Location: Israel

PostPosted: Wed Dec 17, 2014 8:10 pm    Post subject:
Reply with quote

use the COALESCE function:
COALESCE(Emp_addr,'NULL')
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 LOAD JCL for db2 table, taking too lo... Somnath Giri DB2 2 Mon Oct 14, 2019 3:35 pm
No new posts Adding FIND to ISPF Panel display of ... Harold Barnes TSO/ISPF 3 Mon Oct 07, 2019 5:46 pm
No new posts Query to Truncate value in table bhaskar_kanteti DB2 2 Mon Aug 12, 2019 3:26 pm
No new posts RACF RANGE TABLE Martin Wickenden All Other Mainframe Topics 1 Mon Jul 08, 2019 9:06 pm
No new posts IMS DB2 Unload kshkumar2231 DFSORT/ICETOOL 4 Mon Apr 22, 2019 8:26 pm

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