Re: HELP! API INFO
Posted in 1996
On 15 Nov 96 at 21:48, Blair Maddock wrote:
> I have an Informix On line server running and I can create, modify tables
> and the whole shot, but how can I run SQL queries on the fly. I want a
> query to run on a cron job on my sun server. Do I have to use New Era or
> something or can I just send arguments to the dbaccess API?
I've never heard dbaccess described as an API before! :-)
1. Edit a text file called whatever.sql. This file will contain the
SQL statements you want run.
2. Edit a script file (your_script) in which you set your INFORMIXDIR and PATH and
any other environment variables you require (DBDATE, etc.) Then add a
line which says
dbaccess yourdbname /full/path/to/whatever > /your/output/file
(you don't need the .sql extension)
3. From cron run dbaccess as follows:
* * * * * /full/path/to/your_script
That should do it. If I've missed something, I'm sure you'll be told!
:-)
HTH.
--
Ciao,
Billy
I'd be in favour of apathy, but I just can't get
fired up about it...