Index: en/reference/ibm_db2/ini.xml
===================================================================
RCS file: /repository/phpdoc/en/reference/ibm_db2/ini.xml,v
retrieving revision 1.3
diff -u -u -r1.3 ini.xml
--- en/reference/ibm_db2/ini.xml	20 Jul 2005 18:45:50 -0000	1.3
+++ en/reference/ibm_db2/ini.xml	3 Nov 2006 18:32:17 -0000
@@ -23,6 +23,18 @@
       <entry></entry>
      </row>
      <row>
+      <entry>ibm_db2.i5_allow_commit</entry>
+      <entry>"0"</entry>
+      <entry>PHP_INI_SYSTEM</entry>
+      <entry></entry>
+     </row>
+     <row>
+      <entry>ibm_db2.i5_dbcs_alloc</entry>
+      <entry>"0"</entry>
+      <entry>PHP_INI_SYSTEM</entry>
+      <entry></entry>
+     </row>
+     <row>
       <entry>ibm_db2.instance_name</entry>
       <entry>NULL</entry>
       <entry>PHP_INI_SYSTEM</entry>
@@ -67,6 +79,54 @@
      </para>
     </listitem>
    </varlistentry>
+   <varlistentry id="ini.ibm-db2.i5_allow_commit">
+    <term>
+     <parameter>ibm_db2.i5_allow_commit</parameter>
+     <type>integer</type>
+    </term>
+    <listitem>
+     <para>
+      This option controls the commit mode used for i5 schema collections 
+      in the PHP application.
+      <itemizedlist>
+       <listitem>
+        <para>
+         0 no commit (see i5_commit for override)
+        </para>
+       </listitem>
+       <listitem>
+        <para>
+         1 allow commit (see i5_commit for override)
+        </para>
+       </listitem>
+      </itemizedlist>
+     </para>
+    </listitem>
+   </varlistentry>
+   <varlistentry id="ini.ibm-db2.i5_dbcs_alloc">
+    <term>
+     <parameter>ibm_db2.i5_dbcs_alloc</parameter>
+     <type>integer</type>
+    </term>
+    <listitem>
+     <para>
+      This option controls the internal ibm_db2 allocation scheme 
+      for large DBCS column buffers.
+      <itemizedlist>
+       <listitem>
+        <para>
+         0 no expanded allocations (see i5_dbcs_alloc for override)
+        </para>
+       </listitem>
+       <listitem>
+        <para>
+         1 use expanded allocations (see i5_dbcs_alloc for override)
+        </para>
+       </listitem>
+      </itemizedlist>
+     </para>
+    </listitem>
+   </varlistentry>
    <varlistentry id="ini.ibm-db2.instance-name">
     <term>
      <parameter>ibm_db2.instance_name</parameter>
Index: en/reference/ibm_db2/functions/db2-connect.xml
===================================================================
RCS file: /repository/phpdoc/en/reference/ibm_db2/functions/db2-connect.xml,v
retrieving revision 1.7
diff -u -u -r1.7 db2-connect.xml
--- en/reference/ibm_db2/functions/db2-connect.xml	21 Feb 2006 16:42:41 -0000	1.7
+++ en/reference/ibm_db2/functions/db2-connect.xml	3 Nov 2006 18:32:19 -0000
@@ -167,6 +167,233 @@
         </varlistentry>
        </variablelist>
       </para>
+      <para>
+       The following new i5/OS options are available as of ibm_db2 version 1.5.1. 
+       Note: prior versions of ibm_db2 do not support these new i5 options.
+       <variablelist>
+        <varlistentry>
+         <term><parameter>i5_lib</parameter></term>
+         <listitem>
+          <para>
+           A character value that indicates the default library that will be 
+           used for resolving unqualified file references. This is not valid 
+           if the connection is using system naming mode.
+          </para>
+         </listitem>
+        </varlistentry>
+        <varlistentry>
+         <term><parameter>i5_naming</parameter></term>
+         <listitem>
+          <para>
+           <literal>DB2_I5_NAMING_ON</literal> value turns on DB2 UDB CLI iSeries 
+           system naming mode. Files are qualified using the slash (/) delimiter. 
+           Unqualified files are resolved using the library list for the job.
+          </para>
+          <para>
+           <literal>DB2_I5_NAMING_OFF</literal> value turns off DB2 UDB CLI default 
+           naming mode, which is SQL naming. Files are qualified using the period (.) 
+           delimiter. Unqualified files are resolved using either the default library 
+           or the current user ID.
+          </para>
+         </listitem>
+        </varlistentry>
+        <varlistentry>
+         <term><parameter>i5_commit</parameter></term>
+         <listitem>
+          <para>
+           The <parameter>i5_commit</parameter> attribute should be set before the 
+           <function>db2_connect</function>. If the value is changed after the 
+           connection has been established, and the connection is to a remote data 
+           source, the change does not take effect until the next successful 
+           <function>db2_connect</function> for the connection handle.
+          </para>
+          <para>
+           Note: php.ini setting <parameter>ibm_db2.i5_allow_commit</parameter>==0 
+           or <literal>DB2_I5_TXN_NO_COMMIT</literal> is the default, but may be 
+           overridden with the <parameter>i5_commit</parameter> option.
+          </para>
+          <para>
+           <literal>DB2_I5_TXN_NO_COMMIT</literal> - Commitment control is not used.
+          </para>
+          <para>
+           <literal>DB2_I5_TXN_READ_UNCOMMITTED</literal> - Dirty reads, nonrepeatable 
+           reads, and phantoms are possible.
+          </para>
+          <para>
+           <literal>DB2_I5_TXN_READ_COMMITTED</literal> - Dirty reads are not possible. 
+           Nonrepeatable reads, and phantoms are possible.
+          </para>
+          <para>
+           <literal>DB2_I5_TXN_REPEATABLE_READ</literal> - Dirty reads and nonrepeatable 
+           reads are not possible. Phantoms are possible.
+          </para>
+          <para>
+           <literal>DB2_I5_TXN_SERIALIZABLE</literal> - Transactions are serializable. 
+           Dirty reads, non-repeatable reads, and phantoms are not possible
+          </para>
+         </listitem>
+        </varlistentry>
+        <varlistentry>
+         <term><parameter>i5_query_optimize</parameter></term>
+         <listitem>
+          <para>
+            <literal>DB2_FIRST_IO</literal> All queries are optimized with the goal of 
+            returning the first page of output as fast as possible. This goal works well 
+            when the output is controlled by a user who is most likely to cancel the query 
+            after viewing the first page of output data. Queries coded with an 
+            OPTIMIZE FOR nnn ROWS clause honor the goal specified by the clause.
+          </para>
+          <para>
+           <literal>DB2_ALL_IO All</literal> queries are optimized with the goal of running 
+           the entire query to completion in the shortest amount of elapsed time. This is a 
+           good option when the output of a query is being written to a file or report, or 
+           the interface is queuing the output data. Queries coded with an OPTIMIZE FOR nnn 
+           ROWS clause honor the goal specified by the clause. This is the default.
+          </para>
+         </listitem>
+        </varlistentry>
+        <varlistentry>
+         <term><parameter>i5_dbcs_alloc</parameter></term>
+         <listitem>
+          <para>
+           <literal>DB2_I5_DBCS_ALLOC_ON</literal> value turns on DB2 6X allocation scheme 
+           for DBCS translation column size growth.
+          </para>
+          <para>
+           <literal>DB2_I5_DBCS_ALLOC_OFF</literal> value turns off DB2 6X allocation scheme 
+           for DBCS translation column size growth. 
+          </para>
+          <para>
+           Note: php.ini setting <parameter>ibm_db2.i5_dbcs_alloc</parameter>==0 or 
+           <literal>DB2_I5_DBCS_ALLOC_OFF</literal> is the default, but may be overridden 
+           with the <parameter>i5_dbcs_alloc</parameter> option.
+          </para>
+         </listitem>
+        </varlistentry>
+        <varlistentry>
+         <term><parameter>i5_date_fmt</parameter></term>
+         <listitem>
+          <para>
+           <literal>SQL_FMT_ISO</literal> - The International Organization for Standardization 
+           (ISO) date format yyyy-mm-dd is used. This is the default.
+          </para>
+          <para>
+           <literal>DB2_I5_FMT_USA</literal> - The United States date format mm/dd/yyyy is used.
+          </para>
+          <para>
+           <literal>DB2_I5_FMT_EUR</literal> - The European date format dd.mm.yyyy is used.
+          </para>
+          <para>
+           <literal>DB2_I5_FMT_JIS</literal> - The Japanese Industrial Standard date format 
+           yyyy-mm-dd is used. 
+          </para>
+          <para>
+           <literal>DB2_I5_FMT_MDY</literal> - The date format mm/dd/yyyy is used. 
+          </para>
+          <para>
+           <literal>DB2_I5_FMT_DMY</literal> - The date format dd/mm/yyyy is used.
+          </para>
+          <para>
+           <literal>DB2_I5_FMT_YMD</literal> - The date format yy/mm/dd is used.
+          </para>
+          <para>
+           <literal>DB2_I5_FMT_JUL</literal> - The Julian date format yy/ddd is used.
+          </para>
+          <para>
+           <literal>DB2_I5_FMT_JOB</literal> - The job default is used.
+          </para>
+         </listitem>
+        </varlistentry>
+        <varlistentry>
+         <term><parameter>i5_date_sep</parameter></term>
+         <listitem>
+          <para>
+           <literal>DB2_I5_SEP_SLASH</literal> - A slash ( / ) is used as the date separator. 
+           This is the default.
+          </para>
+          <para>
+           <literal>DB2_I5_SEP_DASH</literal> - A dash ( - ) is used as the date separator.
+          </para>
+          <para>
+           <literal>DB2_I5_SEP_PERIOD</literal> - A period ( . ) is used as the date 
+           separator.
+          </para>
+          <para>
+           <literal>DB2_I5_SEP_COMMA</literal> - A comma ( , ) is used as the date separator.
+          </para>
+          <para>
+           <literal>DB2_I5_SEP_BLANK</literal> - A blank is used as the date separator.
+          </para>
+          <para>
+           <literal>DB2_I5_SEP_JOB</literal> - The job default is used
+          </para>
+         </listitem>
+        </varlistentry>
+        <varlistentry>
+         <term><parameter>i5_time_fmt</parameter></term>
+         <listitem>
+          <para>
+           <literal>DB2_I5_FMT_ISO</literal> - The International Organization for 
+           Standardization (ISO) time format hh.mm.ss is used. This is the default.
+          </para>
+          <para>
+           <literal>DB2_I5_FMT_USA</literal> - The United States time format 
+           hh:mmxx is used, where xx is AM or PM.
+          </para>
+          <para>
+           <literal>DB2_I5_FMT_EUR</literal> - The European time format hh.mm.ss 
+           is used.
+          </para>
+          <para>
+           <literal>DB2_I5_FMT_JIS</literal> - The Japanese Industrial Standard 
+           time format hh:mm:ss is used.
+          </para>
+          <para>
+           <literal>DB2_I5_FMT_HMS</literal> - The hh:mm:ss format is used.
+          </para>
+         </listitem>
+        </varlistentry>
+        <varlistentry>
+         <term><parameter>i5_time_sep</parameter></term>
+         <listitem>
+          <para>
+           <literal>DB2_I5_SEP_COLON</literal> - A colon ( : ) is used as the time 
+           separator. This is the default.
+          </para>
+          <para>
+           <literal>DB2_I5_SEP_PERIOD</literal> - A period ( . ) is used as the time 
+           separator.
+          </para>
+          <para>
+           <literal>DB2_I5_SEP_COMMA</literal> - A comma ( , ) is used as the time 
+           separator.
+          </para>
+          <para>
+           <literal>DB2_I5_SEP_BLANK</literal> - A blank is used as the time separator.
+          </para>
+          <para>
+           <literal>DB2_I5_SEP_JOB</literal> - The job default is used.
+          </para>
+         </listitem>
+        </varlistentry>
+        <varlistentry>
+         <term><parameter>i5_decimal_sep</parameter></term>
+         <listitem>
+          <para>
+           <literal>DB2_I5_SEP_PERIOD</literal> - A period ( . ) is used as 
+           the decimal separator. This is the default.
+          </para>
+          <para>
+           <literal>DB2_I5_SEP_COMMA</literal> - A comma ( , ) is used as the 
+           date separator.
+          </para>
+          <para>
+           <literal>DB2_I5_SEP_JOB</literal> - The job default is used.
+          </para>
+         </listitem>
+        </varlistentry>
+       </variablelist>
+      </para>
      </listitem>
     </varlistentry>
    </variablelist>
@@ -293,7 +520,36 @@
 ]]>
     </screen>
    </example>
-
+   <example>
+    <title>i5/OS best performance</title>
+    <para>
+     To achieve best performance for your i5/OS ibm_db2 1.5.1 PHP application 
+     use the default host, userid, and password for your 
+     <function>db2_connect</function>.
+    </para>
+    <programlisting role="php">
+<![CDATA[
+<?php
+  $library = "ADC";
+  $i5 = db2_connect("", "", "", array("i5_lib"=>"qsys2"));
+  $result = db2_exec($i5, 
+       "select * from systables where table_schema = '$library'");
+  while ($row = db2_fetch_both($result)) {               
+     echo $row['TABLE_NAME']."</br>";                     
+  }                                                      
+  db2_close($i5);
+?>
+]]>
+    </programlisting>
+    &example.outputs;
+    <screen>
+<![CDATA[
+ANIMALS
+NAMES
+PICTURES
+]]>
+    </screen>
+   </example>
   </para>
  </refsect1>
 
Index: en/reference/ibm_db2/functions/db2-fetch-row.xml
===================================================================
RCS file: /repository/phpdoc/en/reference/ibm_db2/functions/db2-fetch-row.xml,v
retrieving revision 1.5
diff -u -u -r1.5 db2-fetch-row.xml
--- en/reference/ibm_db2/functions/db2-fetch-row.xml	12 Jul 2005 17:39:24 -0000	1.5
+++ en/reference/ibm_db2/functions/db2-fetch-row.xml	3 Nov 2006 18:32:19 -0000
@@ -101,6 +101,52 @@
 ]]>
     </screen>
    </example>
+   <example>
+    <title>i5/OS recommended alternatives to db2_fetch_row/db2_result</title>
+    <para>
+     On i5/OS it is recommended that you use <function>db2_fetch_both</function>, 
+     <function>db2_fetch_array</function>, or <function>db2_fetch_object</function> 
+     over <function>db2_fetch_row</function>/<function>db2_result</function>. In general 
+     <function>db2_fetch_row</function>/<function>db2_result</function> have more issues 
+     with various column types in <literal>EBCIDIC</literal> to <literal>ASCII</literal> 
+     translation, including possible truncation in <literal>DBCS</literal> applications. 
+     You may also find the performance of <function>db2_fetch_both</function>, 
+     <function>db2_fetch_array</function>, and <function>db2_fetch_object</function> to 
+     be superior to <function>db2_fetch_row</function>/<function>db2_result</function>.
+    </para>
+    <programlisting role="php">
+<![CDATA[
+<?php
+  $conn = db2_connect("","","");
+  $sql = 'SELECT SPECIFIC_SCHEMA, SPECIFIC_NAME, ROUTINE_SCHEMA, ROUTINE_NAME, ROUTINE_TYPE, ROUTINE_CREATED, ROUTINE_BODY, IN_PARMS, OUT_PARMS, INOUT_PARMS, PARAMETER_STYLE, EXTERNAL_NAME, EXTERNAL_LANGUAGE FROM QSYS2.SYSROUTINES FETCH FIRST 2 ROWS ONLY';
+  $stmt = db2_exec($conn, $sql, array('cursor' => DB2_SCROLLABLE));
+  while ($row = db2_fetch_both($stmt)){
+    echo "<br>db2_fetch_both {$row['SPECIFIC_NAME']} {$row['ROUTINE_CREATED']} {$row[5]}";
+  }
+  $stmt = db2_exec($conn, $sql, array('cursor' => DB2_SCROLLABLE));
+  while ($row = db2_fetch_array($stmt)){
+    echo "<br>db2_fetch_array {$row[1]}  {$row[5]}";
+  }
+  $stmt = db2_exec($conn, $sql, array('cursor' => DB2_SCROLLABLE));
+  while ($row = db2_fetch_object($stmt)){
+    echo "<br>db2_fetch_object {$row->SPECIFIC_NAME} {$row->ROUTINE_CREATED}";
+  }
+  db2_close($conn);
+?>
+]]>
+    </programlisting>
+    &example.outputs;
+    <screen>
+<![CDATA[
+db2_fetch_both MATCH_ANIMAL 2006-08-25-17.10.23.775000 2006-08-25-17.10.23.775000
+db2_fetch_both MULTIRESULTS 2006-10-17-10.11.05.308000 2006-10-17-10.11.05.308000
+db2_fetch_array MATCH_ANIMAL 2006-08-25-17.10.23.775000
+db2_fetch_array MULTIRESULTS 2006-10-17-10.11.05.308000
+db2_fetch_object MATCH_ANIMAL 2006-08-25-17.10.23.775000
+db2_fetch_object MULTIRESULTS 2006-10-17-10.11.05.308000
+]]>
+    </screen>
+   </example>
   </para>
  </refsect1>
 
Index: en/reference/ibm_db2/functions/db2-set-option.xml
===================================================================
RCS file: /repository/phpdoc/en/reference/ibm_db2/functions/db2-set-option.xml,v
retrieving revision 1.3
diff -u -u -r1.3 db2-set-option.xml
--- en/reference/ibm_db2/functions/db2-set-option.xml	4 Oct 2006 00:44:12 -0000	1.3
+++ en/reference/ibm_db2/functions/db2-set-option.xml	3 Nov 2006 18:32:19 -0000
@@ -124,6 +124,27 @@
                 </varlistentry>
               </variablelist>
             </para>
+            <para>
+             The following new i5/OS options are available as of ibm_db2 version 1.5.1. 
+             Note: prior versions of ibm_db2 do not support these new i5 options.
+              <variablelist>
+                <varlistentry>
+                  <term><parameter>i5_fetch_only</parameter></term>
+                  <listitem>
+                    <para>
+                     <literal>DB2_I5_FETCH_ON</literal> - Cursors are read-only 
+                     and cannot be used for positioned updates or deletes. This 
+                     is the default unless <literal>SQL_ATTR_FOR_FETCH_ONLY</literal> 
+                     environment has been set to <literal>SQL_FALSE</literal>.
+                    </para>
+                    <para>
+                     <literal>DB2_I5_FETCH_OFF</literal> - Cursors can be used 
+                     for positioned updates and deletes.
+                    </para>
+                  </listitem>
+                </varlistentry>
+               </variablelist>
+            </para>
           </listitem>
         </varlistentry>
         <varlistentry>
@@ -252,6 +273,20 @@
               <entry colname="col4">X</entry>
               <entry colname="col5">-</entry>
             </row>
+            <row>
+              <entry>i5_fetch_only</entry>
+              <entry><literal>DB2_I5_FETCH_ON</literal></entry>
+              <entry colname="col3">-</entry>
+              <entry colname="col4">X</entry>
+              <entry colname="col5">-</entry>
+            </row>
+            <row>
+              <entry>i5_fetch_only</entry>
+              <entry><literal>DB2_I5_FETCH_OFF</literal></entry>
+              <entry colname="col3">-</entry>
+              <entry colname="col4">X</entry>
+              <entry colname="col5">-</entry>
+            </row>
           </tbody>
         </tgroup>
       </table>
@@ -638,6 +673,34 @@
     [comm] => 1904.00
 )]]></screen>
       </example>
+      <example>
+        <title>i5/OS cursors are read-only</title>
+        <para>
+        </para>
+        <programlisting role="php">
+<![CDATA[
+<?php
+  $conn = db2_connect("", "", "", array("i5_lib"=>"nobody"));
+  $stmt = db2_prepare($conn, 'select * from names where first = ?');
+  $name = "first2";
+  db2_bind_param($stmt, 1, "name", DB2_PARAM_IN);
+  $options = array("i5_fetch_only"=>DB2_I5_FETCH_ON);
+  db2_set_option($stmt,$options,0);
+  if (db2_execute($stmt)) {
+    while ($row = db2_fetch_array($stmt)) {
+      echo "{$row[0]} {$row[1]}";
+    }
+  }
+?>
+]]>
+        </programlisting>
+        &example.outputs;
+        <screen>
+<![CDATA[
+first2 last2
+]]>
+        </screen>
+      </example>
     </para>
   </refsect1>
   <refsect1 role="seealso">
