Where can I find the redistributable version of the IBM DB2 Type 4 driver? I suppose this is the driver I would use to connect from a Java app (on windows) to DB2 on the mainframe?
If you're running on an AS/400 (or iSeries, or whatever the heck IBM is calling it these days), you'll probably want to get it from JTOpen (http://jt400.sourceforge.net/). Their toolbox replaces the old Java Toolbox and includes the JDBC drivers.
You can get the drivers from the IBM site. You will need to have IBM ID and password to login (which you can obtain here). Zip file is about 7 MBs, in contains DB2 9.5 JDBC (type 2/4) and SQLJ drivers. Type 4 drivers are in db2jcc4.jar. However, you won't be able to connect to mainframes with this driver if mainframe is running DB2 for z/OS. To do so, you need at least to purchase DB2 Connect product, which will cost you about $500 minimum.
IBM's Fix pack site has the "IBM Data Server Driver for JDBC and SQLJ" which is nothing but the JDBC type 4 driver. Though the page I pointed to above happens to be the windows page, it's the same type 4 driver for all platforms, as should be expected.
I don't think any user/password is required.
You will not be able to connect to the mainframe with any redistributable JDBC driver. The driver pack consists of the actual type 4 driver (db2jcc.jar) and any number of license files of the form:
db2jcc_license_cisuz.jar
where cisuz is the platforms you're allowed to run on (iSeries, pSeries, System z, LUW and so on). You're only likely to get "cu" with any freely distributable pack. You need the "z" to access DB2 on the mainframe and that's jealously guarded so you'll need to purchase an enterprise edition of DB2 Connect to get it.
Without that license file, the type 4 driver won't even try to talk to the server, you'll get an exception.