On 10-Nov-2015 12:43 -0600, Justin Dearing wrote:
On Tue, Nov 10, 2015 at 10:51 AM Buck Calabro wrote:
On 10-Nov-2015 08:01 -0600, Justin Dearing wrote:
<<SNIP>> In PHP I used db2_connect() to talk to the windows
local db2 instance from windows with a connection string
"DATABASE=sample;HOSTNAME=localhost;UID=zippy;PWD=****".
It worked. <<SNIP>>

There isn't one, single DB2. There are three of them:
DB2 for z (mainframe)
DB2 for LUW (Linux, Unix, Windows)
DB2 for i (that's us!)

Each one needs a different ODBC driver. The ODBC driver for DB2 for
i comes with IBM Access for Windows, and there's an equivalent in
the Access Client Solutions package as well. <<SNIP>>

Ok, but PHP is abstracting this away. There is one ibm_db2 driver
with one db2_connect call for all the DB2 flavors and apache derby.
<<SNIP>>

I suspect that essentially summarizes also, what is an answer to the Subject question; i.e. what allows the PHP to have a generic connection interface across the various DB2 variants, is also what has done all of the underlying work to effect that abstraction, and that is the what DB2 Connect is providing.? So, probably it is the "IBM DB2 Connect™ (based on DRDA), that makes access entirely transparent to applications and also masks the need to know the networking protocol in use. DB2 9.7 [sic; DB2 LUW], DB2 for z/OS and DB2 for i all support DRDA-based access." ref: [https://m.ibm.com/https/www-304.ibm.com/partnerworld/wps/servlet/ContentHandler/stg_ast_sys-wp-understanding-db2-for-i-db2-family]

FWiW: I suspect using the db2_connect() function of PHP as shown as having "worked", would also function to redirect the SQL request via the DRDA Application Requester (AR) of the DB2 LUW to the DRDA Application Server (AS) of the DB2 for i either by use of three-part naming or initiating a SQL statement to CONNECT to the DB2 for i. The pre-requisite for either, surely would be to configure [and verify success with] the DRDA connection from the DB2 LUW to the DB2 for i.


This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].