masking errors in DBACCESS
Posted in 1998
I'm using dbaccess from Unix as a batch mechanism for database updating,
reporting, etc.
e.g.
dbaccess db - << $$
drop table mystuff;
create table mystuff ...
insert into mystuff ....
.
.
$$
I always drop tables before I create them, even if they don't exist, and
so I get messages like the following appearing:
206: The specified table (mystuff) is not in the database.
111: ISAM error: no record found.
Error in line 1Near character position 18
I'd rather not have errors from these "drop's" appear.
Is there anyway to mask certain errors (such as 206) in dbaccess? I
know about using the SPL "on exception" but this only seems to work in
procedures. (As an aside, is there an SPL equivalent to Oracle's
"anonymous PL/SQL"?)
Any help here would be greatly appreciated!
Thanks,..
Mike
--
-------------------------------------------------------------
Mike Dunham-Wilkie, M.Sc., M.P.A. Tel: (250) 472-4372
Barrodale Computing Services Ltd. Fax: (250) 472-4373
Web: http://www.barrodale.com Email: mike@barrodale.com
-------------------------------------------------------------
Mailing Address Shipping Address
--------------- ----------------
P.O. Box 3075 Hut R, McKenzie Avenue
Victoria BC V8W 3W2 University of Victoria
Canada Victoria BC V8W 2Y2
Canada
-------------------------------------------------------------