Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
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
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.