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

Unload from Table with DSNTIAUL delimited by pipe symbol


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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: 1356
Location: Israel

PostPosted: Wed Dec 17, 2014 8:10 pm
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 All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Integrate IBM High Perfomance Unload ... DB2 0
No new posts To join 2 tables and to join 3rd tabl... DB2 8
No new posts Create a specific record/file based o... SYNCSORT 8
No new posts Dynamically build unload and load sta... DB2 14
No new posts Extract ISPF table column headings CLIST & REXX 2
Search our Forums:


Back to Top