You can
- write a esql/c program... but i never do that...
- Use a dbaccess (in a shell program)
some examples:
echo "select * from table_X" | dbaccess myDB ;
dbaccess myDB Myselect.sql ;
dbaccess myDB <<EOF
select * from table_X
EOF
Read the dbaccess manual...
http://www-306.ibm.com/software/data...y/ids_100.html