There is no flag or env var to be set in order to have a read-only odbc connection.
You could create an odbc user with only read-only permissions...
f.ex.
user odbc.
1. Make sure the user 'public' doesn't have RESOURCE or DBA or CONNECT permission...
in dbaccess:
unload to revoke_permissions.sql DELIMITER ';'
SELECT "REVOKE ALL ON " || tabname || " FROM public"
from systables
where tabname > 99
and tabtype = 'T'
2. Execute the revoke_permissions.sql
3 Set permissions for user 'odbc'
in dbaccess:
unload to set_permissions.sql DELIMITER ';'
SELECT "GRANT SELECT ON " || tabname || " TO odbc"
from systables
where tabname > 99
and tabtype = 'T'
4. execute the set_permissions.sql
Let every odbc user connect to the database with that user.