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 ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Isn't Unix great ? :-) -----Original Message----- From: owner-informix-list@iiug.org [mailto 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 |