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 ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |
| |||
| 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 > > |
| |||
| 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 > > > > > |
| ||||
| 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 |