/*
 * mkodbc.cmd -- Build the file ODBCINST.INI
 */

parse arg Drive ODBCPath

IniPath = '\os2\odbcinst.ini'

call RXFuncAdd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs'
call SysLoadFuncs

ODBCIniPath = Drive || IniPath

result = SysIni( ODBCIniPath , "ODBC Drivers", "Insight Postgres SQL 7.1", "Installed" )
result = SysIni( ODBCIniPath , "Insight Postgres SQL 7.1", "Driver", ODBCPath || "\drivers\psqlodbc.dll" || d2c(00) )
result = SysIni( ODBCIniPath , "Insight Postgres SQL 7.1", "Setup" , ODBCPath || "\drivers\psqlodbc.dll" || d2c(00) )

result = SysIni( ODBCIniPath , "ODBC Drivers", "Intersolv 3.01 Btrieve", "Installed" )
result = SysIni( ODBCIniPath , "Intersolv 3.01 Btrieve", "Driver", ODBCPath || "\drivers\ibbtr12.dll" || d2c(00) )
result = SysIni( ODBCIniPath , "Intersolv 3.01 Btrieve", "Setup" , ODBCPath || "\drivers\ibbtr12.dll" || d2c(00) )

result = SysIni( ODBCIniPath , "ODBC Drivers", "Intersolv 3.01 db2", "Installed" )
result = SysIni( ODBCIniPath , "Intersolv 3.01 db2", "Driver", ODBCPath || "\drivers\ibdb212.dll" || d2c(00) )
result = SysIni( ODBCIniPath , "Intersolv 3.01 db2", "Setup" , ODBCPath || "\drivers\ibdb212.dll" || d2c(00) )

result = SysIni( ODBCIniPath , "ODBC Drivers", "Intersolv 3.01 dBase", "Installed" )
result = SysIni( ODBCIniPath , "Intersolv 3.01 dBase", "Driver", ODBCPath || "\drivers\ibdbf12.dll" || d2c(00) )
result = SysIni( ODBCIniPath , "Intersolv 3.01 dBase", "Setup" , ODBCPath || "\drivers\ibdbf12.dll" || d2c(00) )

result = SysIni( ODBCIniPath , "ODBC Drivers", "Intersolv 3.01 Oracle7", "Installed" )
result = SysIni( ODBCIniPath , "Intersolv 3.01 Oracle7", "Driver", ODBCPath || "\drivers\ibor712.dll" || d2c(00) )
result = SysIni( ODBCIniPath , "Intersolv 3.01 Oracle7", "Setup" , ODBCPath || "\drivers\ibor712.dll" || d2c(00) )

result = SysIni( ODBCIniPath , "ODBC Drivers", "Intersolv 3.01 Sybase10", "Installed" )
result = SysIni( ODBCIniPath , "Intersolv 3.01 Sybase10", "Driver", ODBCPath || "\drivers\ibsyb12.dll" || d2c(00) )
result = SysIni( ODBCIniPath , "Intersolv 3.01 Sybase10", "Setup" , ODBCPath || "\drivers\ibsyb12.dll" || d2c(00) )

result = SysIni( ODBCIniPath , "ODBC Drivers", "Intersolv 3.01 Text", "Installed" )
result = SysIni( ODBCIniPath , "Intersolv 3.01 Text", "Driver", ODBCPath || "\drivers\ibtxt12.dll" || d2c(00) )
result = SysIni( ODBCIniPath , "Intersolv 3.01 Text", "Setup" , ODBCPath || "\drivers\ibtxt12.dll" || d2c(00) )

result = SysIni( ODBCIniPath , "ODBC Drivers", "Intersolv 3.01 Informix5", "Installed" )
result = SysIni( ODBCIniPath , "Intersolv 3.01 Informix5", "Driver", ODBCPath || "\drivers\ibinf512.dll" || d2c(00) )
result = SysIni( ODBCIniPath , "Intersolv 3.01 Informix5", "Setup" , ODBCPath || "\drivers\ibinf512.dll" || d2c(00) )

result = SysIni( ODBCIniPath , "ODBC Translators", "OEM to ANSI", "Installed" )
result = SysIni( ODBCIniPath , "OEM to ANSI", "Translator", ODBCPath || "\dll\ibtrn12.dll" || d2c(00) )
result = SysIni( ODBCIniPath , "OEM to ANSI", "Setup", ODBCPath || "\dll\ibtrn12.dll" || d2c(00) )

exit
