Unix Technical Forum

RE: [Maybe spam] Re: Unloading to two destinations

This is a discussion on RE: [Maybe spam] Re: Unloading to two destinations within the Informix forums, part of the Database Server Software category; --> Isn't Unix great ? :-) -----Original Message----- From: owner-informix-list@iiug.org [mailto wner-informix-list@iiug.org] On Behalf Of Doug Lawry Sent: 12 January ...


Go Back   Unix Technical Forum > Database Server Software > Informix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-20-2008, 08:23 AM
Dirk Moolman
 
Posts: n/a
Default RE: [Maybe spam] Re: Unloading to two destinations


Isn't Unix great ? :-)


-----Original Message-----
From: owner-informix-list@iiug.org [mailtowner-informix-list@iiug.org]
On Behalf Of Doug Lawry
Sent: 12 January 2005 11:51 AM
To: informix-list@iiug.org
Subject: [Maybe spam] Re: Unloading to two destinations

Hi Andy.

Taking Dirk's suggestion a bit further, firstly create a FIFO file in
Unix using
mknod or mkfifo, then start up an awk script reading from the FIFO,
containing
something like:

BEGIN {
FS = "|"
}

{
if (condition)
print > "reload.unl"
else
print | "gzip > purge.unl.gz"
}

Use compress if you don't have gzip. Then in dbaccess run:

UNLOAD TO "fifo" SELECT * FROM tablename

--
Regards,
Doug Lawry
www.douglawry.webhop.org



sending to informix-list
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 11:32 AM.


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