Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums 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: 1284
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 Extracting DDL for all list of intere... Ashishpanpaliya DB2 5 Mon May 21, 2018 4:08 pm
No new posts Searching a table for the field name? socker_dad COBOL Programming 8 Sat Mar 31, 2018 2:57 am
No new posts Need inputs on DB2 tablespace/table r... ashek15 DB2 3 Sat Mar 24, 2018 11:49 pm
No new posts COBOL declaration for table Poha Eater DB2 3 Mon Feb 26, 2018 6:58 pm
No new posts load and delete table through JCL wit... ram_vizag JCL & VSAM 9 Thu Feb 01, 2018 12:47 am

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