Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / July 2007

Tip: Looking for answers? Try searching our database.

Specifying Record Delimiter

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
pankaj_wolfhunter@yahoo.co.in - 23 Jul 2007 14:19 GMT
Greetings,
               Some time back I got some good advice from this group.
Again got stuck with something.

I am using export utility to store data to flat files.

For now I am using the following:

EXPORT TO export_file_name OF DEL MODIFIED BY NOCHARDEL
TIMESTAMPFORMAT=\"MMM DD YYYY HH:MM:SS:UUTT\" COLDEL# select query

Can I change the default (newline) record delimiter to something of my
own choice?

Any help would be appreciated.

TIA
Dave Hughes - 23 Jul 2007 16:33 GMT
> Greetings,
>                 Some time back I got some good advice from this group.
[quoted text clipped - 9 lines]
> Can I change the default (newline) record delimiter to something of my
> own choice?

As far as I can tell: no, you can't change the row delimiter (only the
column and string delimiters). If you're on Linux you could always use
the dos2unix / unix2dos utilities to convert the file afterward
(sometimes these are called d2u or u2d). There's probably Windows
versions of these too, somewhere.

Alternatively you could write a quick script to handle the conversion.
For example, under Python, the following would do the trick to convert
to DOS (CRLF) line endings:

input = open('export_file_name', 'rU')
output = open('export_file_name.conv', 'w')
for line in input:
   output.write(line.rstrip('\n') + '\r\n')

HTH,

Dave.

--
pankaj_wolfhunter@yahoo.co.in - 23 Jul 2007 16:38 GMT
> pankaj_wolfhun...@yahoo.co.in wrote:
> > Greetings,
[quoted text clipped - 31 lines]
>
> --

Thanks Dave.
Even I figured out after googling that we might not able to define a
row delimiter.
Just wanted to confirm. I already wrote a script on unix side to
handle the conversion.
Thanks again.
Ray - 27 Jul 2007 15:59 GMT
On Jul 23, 10:38 am, "pankaj_wolfhun...@yahoo.co.in"
<pankaj_wolfhun...@yahoo.co.in> wrote:

> > pankaj_wolfhun...@yahoo.co.in wrote:
> > > Greetings,
[quoted text clipped - 38 lines]
> handle the conversion.
> Thanks again.

I highly recommend you get a good editor to use on the DOS side that
can do all this stuff transparently. I use a Java-based editor called
jEdit that has an FTP plugin that lets you treat FTP like another file
system.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.