Relational databases/ OBDC connections...
Vidyasagar Goparaju
Vidyasagar.Goparaju at kewill.com
Tue Jun 11 12:38:52 CDT 2013
We run our Powerhouse application on different environments.
On AIX/Oracle environment we use the following in our PDL so we can connect to different database/schema:
Database mydatabase &
Description "My Database" &
Open "ORACLE@$DBTAG" à I think it is "ODBC@$<variable>" for ODBC connections.
AIX/Unix variable DBTAG is set differently on different systems/environments as <username>@<database>/<password>
Unix command to set DBTAG variable:
export DBTAG=<username>@<database>/<password>
When you compile programs you should use the following compile switches so the program could access the database specified in $DBTAG variable:
quiz subdict=search cc={UNIX,ORACLE} noprefix_openname nolist owner=<username> noowner auto=<program name>.qzs
Example:
DBTAG on the system where the code is compiled: abc at DB1/password
quiz subdict=search cc={UNIX,ORACLE} noprefix_openname nolist owner=<abc> noowner auto=<program name>
DBTAG on the client system: xyz at DBx/password
quiz auto=<programname>.qzc à should work fine.
We switch to different database/schema by simply changing the DBTAG variable. Unfortunately you cannot do this from within a powerhouse application program.
Hope that helps!
Sagar Goparaju
From: powerh-l-bounces+vidyasagar.goparaju=kewill.com at lists.sowder.com [mailto:powerh-l-bounces+vidyasagar.goparaju=kewill.com at lists.sowder.com] On Behalf Of Brian Stephens
Sent: Tuesday, June 11, 2013 10:52 AM
To: powerh-l at lists.sowder.com
Subject: Re: Relational databases/ OBDC connections...
This is a legacy app that I'm not wanting to change..
I have a database say a product catalog that is used throughout the sister compnaies have identical databases.
I use the same programs But when the user is working on the different companies they need to hit the DB for the company they are working..
I need some mechanism to point to the different databases..
There are actually 2 problems
ACCESS PRODUCTS on the HP
becomes
ACCESS Schema.PRODUCTS in COMPANYA
I can select which OBDC driver is attached..
> DATABASE COMPANY &
> Type ODBC &
> Open $COMPANY &
> UserID "********" &
> Password "********"
It works fine but
the ODBC or DB2 is adding the schema to the table name which takes away the uniqueness
show files
TEST2.CUSTOMER IN COMPANYA
On Tue, Jun 11, 2013 at 10:52 AM, Bob Deskin <Bob.Deskin at ca.ibm.com> wrote:
I may not understand this totally, but if the individual databases can be identified on open/attach, you may be able to use environment variables in the OPEN in PDL. If the instances are accessed by different users, perhaps an OWNER technique would work.
Bob
From: Brian Stephens <bws001 at gmail.com>
To: powerh-l at lists.sowder.com,
Date: 2013-06-11 10:22 AM
Subject: Relational databases/ OBDC connections...
Sent by: powerh-l-bounces+bob.deskin=ca.ibm.com at lists.sowder.com
________________________________
If you had multiple instances or the same database.. and you wanted to control that access externally (because you only want to have one copy of the program)
How can you do it... (on the HP sonce the PDL controlled the open a file equation it was easy) But on ODBC i'm trying to wrap my head around how to make it work..
Our platform is windows and the target database is DB2 on iSeries via ODBC..
It doesn't appear I can insert a system variable in the ACCESS statement
It appears I can do this in the PDL.. so I may have some rethink of the DB architecture unless someone else has some ideas..
PS i'm just a bit fuzzy... taking a week to move and driving 2700 km can do that too you..
--
Thanks
Brian Stephens --
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
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 <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.
--
Thanks
Brian Stephens
IMPORTANT NOTICE: This email is intended solely for the use of the individual to whom it is addressed and may contain information that is privileged, confidential or otherwise exempt from disclosure under applicable law. If the reader of this email is not the intended recipient or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by telephone at (978) 482-2500 and return the original message to us at the listed email address. In accordance with Kewill policy, emails sent and received may be monitored. Kewill accepts no responsibility for any loss or damage should this email contain any virus, or similar destructive or mischievous code. Thank You. Copyright © 2012 by Kewill Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sowder.com/pipermail/powerh-l/attachments/20130611/ea43478d/attachment.htm>
More information about the powerh-l
mailing list