$inseq = 598;
$delSql = "DELETE FROM libname.tablename WHERE inseq=?";
$stmt = db2_prepare($conn,$delSql);
$res = db2_execute($stmt,array($inseq));
if(!$res)
{
throw new Exception(db2_stmt_errormsg(), db2_stmt_error());
} else {
$rows = db2_num_rows($stmt);
if ($rows > 0) {
echo "Success! ".$inseq." record deleted from: libname.tablename:". Rows=".$rows;
} else {
echo "Row not found for delete in: ".libname.tablename";
}
}