If you are using PEAR this may not help but this is how I connect to JDE on the iseries using PHP.
Of course first you need the ODBC system DSN connection.
<?php
$server = "systemi"; // ODBC system DSN name
$username = "someuser"; // user on the iSeries
$password = "somepassword"; //user password
$database = "";
$DB2connect = odbc_connect($server, $username, $password) or die(odbc_error());
$query = "SELECT FIELD FROM somelibrary.somefile";
$resultString = odbc_exec($DB2connect, $query);
while ($myrow = odbc_fetch_array($resultString)) {
$result_count = 0;
$ResultSet[$result_count] = $myrow;
$result_count++;
}
foreach ($ResultSet as $row) {
echo $row['FIELD']."<br>";
}
?>
Since you want to connect to JDE files it might help to check convert CCSIB(65535) in set the translation tab in the odbc connection. Some of the fields in JDE have 65535 coded in the dds. If the box is not check you have to Cast the field in the sql to to CCSID 37.