DB2 experts...
Brian Stephens
bws001 at gmail.com
Thu Jun 20 20:18:26 CDT 2013
Thanks Conrad.
Db2 connect is ODBC. It's what we are using.
There is a requirement to share the data with an AS400 which is running RPG. Many of the apps use both languages. The client selected the platforms and essentially the solution stack. We are trying to come up with adaptations. They use multiple instances of the same databases and point to them Db2 Obdc is making this complicated as its requiring the qualification of the schema in the
access statement. We were. Hoping to use different odbc connections as we we can assign a variable in the dictionary. But that doesn't appear to be a solution Then we get into refines. Anyone ever seen 4, 5 or 6 levels of redefine on an item. Types, sizes, whole and partial records. Not fun. We don't really want to rewrite their apps or normalize the database. So we are investigating all solutions.
Sent from my iPhone
On 2013-06-20, at 20:36, Conrad Whittall <Conrad.Whittall at ca.ibm.com> wrote:
> 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
> --
> = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> Mailing list: powerh-l at lists.sowder.com
> Subscribe: 'subscribe' in message body to powerh-l-request at lists.sowder.com
> Unsubscribe: 'unsubscribe <password>' in message body to powerh-l-request at lists.sowder.com
> http://lists.sowder.com/mailman/listinfo/powerh-l
> This list is closed, thus to post to the list you must be a subscriber.
> Add 'site:lists.sowder.com powerh-l' to your search terms to search the list archive at Google.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sowder.com/pipermail/powerh-l/attachments/20130620/1e0b90d9/attachment-0001.htm>
More information about the powerh-l
mailing list