you'll use ODBC.

Study the EXEC_SQL.CONNTYPE and EXEC_SQL.OPEN_CONNECTION features.