#!/usr/bin/expect -f
######################################################################
# Aubit 4gl compiler
# "expect" script for making odbctest non-interactive
# Modify DSN, UID, PWD, HOST and  DATABASE according to your odbc.ini
# and/or database setup
######################################################################

#"odbctest" executable linked with unixODBC manager:
spawn ./odbctest-unixODBC

expect "list):"

#send "DSN=maindb;UID=informix;PWD=ifmx;HOST=localhost;DATABASE=maindb;OPTIONS='aptiva_on'\r"
send "DSN=maindb\r"

expect "SQL>"

send "select * from sysviews\r"

expect "SQL>"
send "exit\r"
expect eof

