Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 1281
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

Senior Member

Joined: 21 Sep 2010
Posts: 2443
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 Convert a packed decimal value to zon... Dinesh Mani DB2 6 Mon Mar 16, 2020 6:02 pm
No new posts IMS DB2 Unload kshkumar2231 DFSORT/ICETOOL 4 Mon Apr 22, 2019 8:26 pm
No new posts DB2 Unload / Load Multiple tables neo4u DB2 8 Tue Nov 27, 2018 3:43 pm
No new posts Change NULL indicator in UNLOAD utility Khadhar Basha DB2 2 Fri Dec 15, 2017 3:01 pm
No new posts unload data from table with lob columns farhad_evan DB2 1 Sat Apr 22, 2017 1:32 pm

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