got it working now. for the sake of anyone searching the forums in the future, here's the solution i found.
Code:
import com.ibm.as400.access.*;
import java.sql.*;
public class test{
// declare data source and con
private static AS400JDBCConnectionPoolDataSource ds;
private Connection con;
// constructor
test(){
ds = new AS400JDBCConnectionPoolDataSource("myAS400","user","pass");
ds.setLibraries("library");
ds.setDateFormat("iso");
}
// get connection from the pool
private Connection getConnection(){
Connection c = null;
try{
javax.sql.PooledConnection pc = ds.getPooledConnection();
c = pc.getConnection();
}catch(Exception e){
//
}
return c;
}
}
this was done by experimenting, trial and error .. so if someothing looks bad, someone please let me know =)