When you creating a DSN in the ODBC applet (Control Panel), the driver is specified there along with the name for your Data source, so no other settings are required in the code.
So if you've created a DSN for the AS/400 database, it should remember the driver as well. Instead of UserName and Password you should use the real UserName and Password for the database, either given to you by database administrator.