RE: [Maybe spam] Re: Unloading to two destinations
Posted in 2005
Isn't Unix great ? :-)
-----Original Message-----
From: owner-informix-list@iiug.org [mailto:owner-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