Unload a table with specific column delimiters and redabale format.

RDBMS from IBM and IBM's Hierarchical DBMS and Transaction Manager (IMS DC).
Post Reply
Shamshir Rai Luthra
New Member
Posts: 4
Joined: Wed Aug 13, 2014 12:10 pm

Unload a table with specific column delimiters and redabale format.

Post by Shamshir Rai Luthra »

Hi

I need to unload a DB2 table. And in the unload I want the columns to be delimited by semicolon, ";". Also all decimal values should be converted in to readable format. For this, I tried to use DSNUPROC like this:

Code: Select all

DELIMITED COLDEL ';'  
PUNCHDDN SYSPUNCH                
UNLDDN SYSREC00 EBCDIC 
But this did not work. Character columns are filled with double quotes. And the length of the unload file became 32756/VB while I'd expect it to as the actual length of the table.

What should I do? Please help.
nicc
Global Moderator
Global Moderator
Posts: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: Unload a table with specific column delimiters and redabale format.

Post by nicc »

How do you expect the row length to be the same when you are converting packed decimal to zoned decimal? A packed decimal field of, say, 4 bytes length would expand to 7, possibly 8, bytes. If any column has a null value in row then there will be null indicators to take into account in the length as well.
Regards
Nic
Shamshir Rai Luthra
New Member
Posts: 4
Joined: Wed Aug 13, 2014 12:10 pm

Re: Unload a table with specific column delimiters and redabale format.

Post by Shamshir Rai Luthra »

Thanks nicc. But unload was not readable too. Can you please suggest a usual way of doing it?

Would appreciate any help you can provide.
nicc
Global Moderator
Global Moderator
Posts: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: Unload a table with specific column delimiters and redabale format.

Post by nicc »

Well, I am not going to search out and read the manual - that is your job.
Regards
Nic
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “IBM DB2 and IMS DB/DC”