Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in


DB2 unload - Need Help

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

New User

Joined: 24 Jul 2007
Posts: 55
Location: noida

PostPosted: Wed May 14, 2014 4:41 pm    Post subject: DB2 unload - Need Help
Reply with quote


I have a requirement to unload the Db2 table delimited by '~'. Any NULL data in a field should be represented as single '#' between 2 delimiters.

A) Trailing spaces for CHAR fields should be removed during unload. ---> able to achieve using RTRIM in below card.

B) CHAR Fields (of Length 1 or Greater) with SPACES should come as a SINGLE SPACE between 2 Delimiters. ie. '~B~' B means single SPACE .
This should happen for all Char fields even if they are of length 1 byte or greater.

I am using the following Data card


FROM Tablename

Question : I am unable to find solution for point (B) ? Can you please help. Thanks.
Back to top
View user's profile Send private message


Senior Member

Joined: 11 Aug 2009
Posts: 1278
Location: Belgium

PostPosted: Fri May 16, 2014 12:15 pm    Post subject:
Reply with quote

you should mention that you are using BMC Unload plus.
and I don't think you can do it during the unload.
You could go for a DFSORT with IN=C'~~',OUT=C'~ ~'
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator

Joined: 21 Sep 2010
Posts: 1569
Location: NY,USA

PostPosted: Wed May 21, 2014 4:00 am    Post subject:
Reply with quote

IIf I understood correctly, instead of select * why don't you mentioned the all the column's and use a case and string to get what you want.
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 Best IMS DB Unload Utility jjabez10 IMS DB/DC 12 Thu Sep 22, 2016 11:15 pm
No new posts DB2 Unload format options Susanta DB2 2 Fri Aug 12, 2016 5:42 pm
No new posts DXT unload utility - DVRE0000 mistah kurtz DB2 1 Thu Jul 07, 2016 4:56 pm
No new posts How to suppress retun code of partil ... mkk157 DB2 9 Fri May 27, 2016 6:59 am
No new posts FAST UNLOAD and LOAD issue GaganGarg DB2 1 Mon Feb 15, 2016 2:30 pm

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