Hi,
Call the below statement froms a script. Make sure you set all your Informix env. variables, in this case all the env. variables are in set_profile file (INFORMIXDIR, PATH, ONCONFIG, INFORMIXSQLHOSTS, INFORMIXSERVER)
cd /export/home/informix
. set_profile
cd /export/home/informix/test
dbaccess - - 2>error.log <<SQLSTMT
drop database test;
SQLSTMT