I am not sure that anyone here has had dealing with i5 functions on Zend for i5/OS but I am trying to read about them and search for the proper techniques. Unfortunately, I have not really found anything that has worked and the documentation that comes with Zend is not helpful.
I am trying to open an DB2 file and do a quick read and seek. The code I have does a read seek on the first record of the file but not on the key that I supply, which kinda defeats the purpose. If anyone knows or understands how to proper work these commands, I would appreciate any help.
<?php
$conn = i5_connect("10.1.4.99", "qtmhttp", "zend");
if (!$conn) { throw_error("i5_connect");
exit();
}
$keyvalue = "2241572";
$file = i5_open("DTSDATA/INDETL",I5_OPEN_READ,$conn);
$ret = i5_seek($file, "=", array($keyvalue));
$rec = i5_fetch_row($file, I5_READ_SEEK);
$billto = $rec['INDBIL'];
$sonum = $rec['INDIN#'];
$itmnum = $rec['INITM#'];
print "$billto<br>";
print "$sonum<br>";
print "$itmnum<br>";
i5_close($conn);
?>