Unix Technical Forum

No double quote in UDB Export DEL file

This is a discussion on No double quote in UDB Export DEL file within the DB2 forums, part of the Database Server Software category; --> Hi all - I wonder if there is any way to specify in UDB for Windows version 7 so ...


Go Back   Unix Technical Forum > Database Server Software > DB2

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 01:47 AM
dps027
 
Posts: n/a
Default No double quote in UDB Export DEL file

Hi all -
I wonder if there is any way to specify in UDB for Windows version 7 so that
in the DEL Export file, there is no double quote (i.e. ") nor any character
strings surrounding the columns of the exported data.
Any information is appreciated.
Thanks in advance.
aw


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 01:47 AM
Philip Sherman
 
Posts: n/a
Default Re: No double quote in UDB Export DEL file

You can export to type IXF which doesn't use delimiters. Of course; you
will have to write a read utility to read the data.

As an alternative; you can use the "-x" clp option to write output
without headers. This will expand all char type columns to their maximum
length, make all defined data types an apropriate fixed length, insert a
single space between columns, and write the whole smash to your output.
db2 -x "select * from t1" >t1.out
The above command will do what you want and write the output to t1.out.
Read the "command reference" manual for additional details about options
for the "db2"command. Other options exist that can route output to a file.

Phil Sherman


dps027 wrote:
> Hi all -
> I wonder if there is any way to specify in UDB for Windows version 7 so that
> in the DEL Export file, there is no double quote (i.e. ") nor any character
> strings surrounding the columns of the exported data.
> Any information is appreciated.
> Thanks in advance.
> aw
>
>


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-27-2008, 01:47 AM
dps027
 
Posts: n/a
Default Re: No double quote in UDB Export DEL file

Thanks for the information.

But I probably may not be able to use both suggestions because of specific
requirement -
1. I need to create an interface file with ascii characters, and due to cost
constraint, I cannot afford writing another read utility for IXF files
(though, I think I will still have a look on the IXF file to see if there is
any surprise, in a good way).
2. I must use export due to codepage requirements, the clp does not quite
handle codepage specifications.

Thanks.
aw


"Philip Sherman" <psherman@ameritech.net> wrote in message
news:8rT5d.846$Rf1.72@newssvr19.news.prodigy.com.. .
> You can export to type IXF which doesn't use delimiters. Of course; you
> will have to write a read utility to read the data.
>
> As an alternative; you can use the "-x" clp option to write output
> without headers. This will expand all char type columns to their maximum
> length, make all defined data types an apropriate fixed length, insert a
> single space between columns, and write the whole smash to your output.
> db2 -x "select * from t1" >t1.out
> The above command will do what you want and write the output to t1.out.
> Read the "command reference" manual for additional details about options
> for the "db2"command. Other options exist that can route output to a file.
>
> Phil Sherman
>
>
> dps027 wrote:
> > Hi all -
> > I wonder if there is any way to specify in UDB for Windows version 7 so

that
> > in the DEL Export file, there is no double quote (i.e. ") nor any

character
> > strings surrounding the columns of the exported data.
> > Any information is appreciated.
> > Thanks in advance.
> > aw
> >
> >

>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-27-2008, 01:48 AM
Knut Stolze
 
Posts: n/a
Default Re: No double quote in UDB Export DEL file

dps027 wrote:

> Hi all -
> I wonder if there is any way to specify in UDB for Windows version 7 so
> that in the DEL Export file, there is no double quote (i.e. ") nor any
> character strings surrounding the columns of the exported data.
> Any information is appreciated.


Isn't the export option "MODIFIED BY CHARDEL x" something you could use?
Maybe you can use a space as character string delimiter?

How about using "sed" to modify the result in the way you like?

sed -e 's/"//g'

--
Knut Stolze
Information Integration
IBM Germany / University of Jena
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:59 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com