RE: flat file extracts
Posted in 2000
Try:
dbaccess mydb <<-sqlEOF >extract.log 2>/dev/null
unload to mydata.dat select lname,fname from users
sqlEOF
This will send your unwanted messages to /dev/null.
-Dave
David A. Buchholz
Manager, Database Technology
Cendant Incorporated
david.buchholz@hit.cendant.com
Voice: 602.220.5853
Fax: 602.220.5877
-----Original Message-----
From: Carlson@WHSmith [mailto:carlson1@bellsouth.net]
Sent: Wednesday, June 14, 2000 7:54 AM
To: informix-list@iiug.org
Subject: Re: flat file extracts
Walter T Rejuney wrote:
>
> I am normally a Oracle DBA and developer, but I have a need to do some
> extremely basic work with an Informix database.
Good to have you with us.
>
> As near as I can determine the version of Informix I'm dealing with is
> 7.2 and it is running on a Sun Ultra-5 workstation.
>
> Basically what I'm doing is this:
>
> dbaccess mydb <<-sqlEOF >extract.log 2>&1
> unload to mydata.dat select lname,fname from users> sqlEOF
>
> It works fine. My data is extracted and it appears in the data file the
> way I want. However, the log file that gets created contains messages
> like "Database selected" "50 row(s) unloaded" and "Database closed". I
> don't care about these messages. I'd like to eliminate them. With
> Oracle's sqlplus I would do a combination of using -s on the command
> line and "set feedback off" inside the script to turn off extraneous
> messages. Is there any equivalent to this with dbaccess?
>
I would recommend something like this:
dbaccess mydb <<-sqlEOF >/dev/null 2>&1
unload to mydata.dat select lname,fname from users
sqlEOF
Of course, that would send the entire log to oblivion. Hopefully you
wouldn't want to trap errors or anything like that.
> Beyond that, does anyone know of a url where I can find documentation on
> dbaccess so that I don't have to ask questions like this here unless I
> get really stuck on some issue?
Some basic documentation could be found at
http://www.informix.com/answers/english/pids73.htm; however, feel free
to post here anytime. There is a wide range of Informix experience
here, from the newbie to the long-term Informix DBA. Enjoy!!
--
John Carlson
Informix DBA
WHSmith USA
#include std_disclaimer.h /* These are my opinions, not my company's
opinion */