Re: HELP! API INFO
Posted in 1996
Topics: Server Administration
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?
Not NewEra. Dbaccess is fine, the parameters are:
dbaccess database script
where your SQL statements are delimited by semi-colons (;) and stored in
the file script.sql. You can also use:
dbaccess database < any_file_name
Remember that cron gives you no environment. So set ALL informix and
required environment variables first. Also ANY output during cron will
be emailed to the owner of the cron job.
Hope this helps,
--
Mark.
+-------------------------------------------------------------------------+
|Mark D. Stock - The West Solutions Group http://www.west.co.za |
| The Informix FAQ is at http://www.iiug.org |
|mailto:marks@west.co.za +------------------------------------------------+
|Tel: +27 11 803 2151 |If it doesn't work... force it! |
|Fax: +27 11 803 2189 |If it breaks... it needed replacing anyway! |
|Cell: +27 83 250 2325 |Well, that's how I code anyway! |
+------------------------+------------------------------------------------+