DB2 experts...

Conrad Whittall Conrad.Whittall at ca.ibm.com
Thu Jun 20 19:36:22 CDT 2013


Brian,

I believe the DB2 feature you're looking for is called a table nickname...

http://pic.dhe.ibm.com/infocenter/db2luw/v9r7/index.jsp?topic=%2Fcom.ibm.db2.luw.sql.ref.doc%2Fdoc%2Fr0002169.html

However, this obviously requires a local DB2 server instance and the 
federated database feature to be enabled. Since you've already mentioned 
that you'd prefer not to use ODBC access, I'm assuming  that you're 
intending to use the native DB2 client access built in to PowerHouse. If 
so, then why not just install and configure the DB2 client (DB2 Connect?) 
on your Windows machine and then connect directly to your DB2 for i 
tables?

Its been a while I since I coded any PowerHouse apps, but in your PDL 
dictionary you would simply declare the database TYPE as DB2 and the OPEN 
name as the name you defined in your DB2 client configuration. Page 34 of 
the PowerHouse 8.4G PDL manual contains the following example (using an 
environment variable for the open name)...

> DATABASE NAGI &
> TYPE DB2 &
> HIGH FILL HEX "7A" &
> NULL VALUES ALLOWED &
> DESCRIPTION &
> "NORTH AMERICAN GEOGRAPHICAL INFORMATION (DB2)" &
> OPEN "$DB2_LOCATION" &
> USER "DBUSER" PASSWORD "DBPASS"

Of course if you also have tables in a local Windows-based DB2 instance 
that you then want to access along with your DB2 for i table(s) then 
perhaps the table nickname route is the way to go...so that all of your 
tables appear to PowerHouse to be in one DB2 instance, and you'll be able 
to use cursors in PowerHouse to have the database process queries and 
updates across both the local and remote tables (rather than having 
PowerHouse access two separate databases and perform the processing 
itself).

Regards,
Conrad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sowder.com/pipermail/powerh-l/attachments/20130620/0503b81a/attachment.htm>


More information about the powerh-l mailing list