Relational databases/ OBDC connections...

Greig Morrison greig.morrison at sympatico.ca
Tue Jun 11 16:22:09 CDT 2013


I have used PC Environment Variables, from the command line or via the
System Properties at the bottom on the Advanced tab.

Your PDL will look like the following:
Database mydatabase  Type ODBC   Open   "$MYDB" &
          UserID "$USERNAME"  Password "$PASSWORD"

Regards,
Greig


-----Original Message-----
From: powerh-l-bounces+greig.morrison=sympatico.ca at lists.sowder.com
[mailto:powerh-l-bounces+greig.morrison=sympatico.ca at lists.sowder.com] On
Behalf Of powerh-l-request at lists.sowder.com
Sent: Tuesday, June 11, 2013 4:24 PM
To: powerh-l at lists.sowder.com
Subject: powerh-l Digest, Vol 95, Issue 3

Send powerh-l mailing list submissions to
	powerh-l at lists.sowder.com

To subscribe or unsubscribe via the World Wide Web, visit
	http://lists.sowder.com/mailman/listinfo/powerh-l
or, via email, send a message with subject or body 'help' to
	powerh-l-request at lists.sowder.com

You can reach the person managing the list at
	powerh-l-owner at lists.sowder.com

When replying, please edit your Subject line so it is more specific than
"Re: Contents of powerh-l digest..."


Today's Topics:

   1. RE:Relational databases/ OBDC connections... (Vidyasagar Goparaju)
   2. OBDC connections  (Bateman, Peter)


----------------------------------------------------------------------

Message: 1
Date: Tue, 11 Jun 2013 13:38:52 -0400
From: "Vidyasagar Goparaju" <Vidyasagar.Goparaju at kewill.com>
Subject: RE: Relational databases/ OBDC connections...
To: "Brian Stephens" <bws001 at gmail.com>
Cc: powerh-l at lists.sowder.com
Message-ID:
	<ED29113E14BBE741AA8CFD0A5972885FAAD1F0 at kusexch.KWLCORP.NET>
Content-Type: text/plain; charset="utf-8"

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 &lt;password&gt;' 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/at
tachment-0001.htm>

------------------------------

Message: 2
Date: Tue, 11 Jun 2013 20:21:53 +0000
From: "Bateman, Peter" <Peter.Bateman at hpadvancedsolutions.com>
Subject: OBDC connections 
To: "'powerh-l at lists.sowder.com'" <powerh-l at lists.sowder.com>
Message-ID: <328C54485CB47146905E7C85C089490A5391400A at cavtmase135>
Content-Type: text/plain; charset="us-ascii"

Hi All:

   I had a similar problem. I solved by putting tags in a resource file
template.
   When the client uses the application s/he first fills out an
authentication screen.
   After verifying the credentials I plugged them into a temporary resource
file that based was on my template. 
   I deleted this resource file after making the connection to the database.
   This is not perfect. For a short time the credentials are being held in a
DOS file on the client's machine.

Regards,
Peter  

 

-----Original Message-----
From:
powerh-l-bounces+peter.bateman=hpadvancedsolutions.com at lists.sowder.com
[mailto:powerh-l-bounces+peter.bateman=hpadvancedsolutions.com at lists.sowder.
com] On Behalf Of powerh-l-request at lists.sowder.com
Sent: June-11-13 10:00 AM
To: powerh-l at lists.sowder.com
Subject: powerh-l Digest, Vol 95, Issue 2

Send powerh-l mailing list submissions to
	powerh-l at lists.sowder.com

To subscribe or unsubscribe via the World Wide Web, visit
	http://lists.sowder.com/mailman/listinfo/powerh-l
or, via email, send a message with subject or body 'help' to
	powerh-l-request at lists.sowder.com

You can reach the person managing the list at
	powerh-l-owner at lists.sowder.com

When replying, please edit your Subject line so it is more specific than
"Re: Contents of powerh-l digest..."


Today's Topics:

   1. Relational databases/ OBDC connections... (Brian Stephens)
   2. Re:Relational databases/ OBDC connections... (Bob Deskin)
   3. Re:Relational databases/ OBDC connections... (Brian Stephens)


----------------------------------------------------------------------

Message: 1
Date: Tue, 11 Jun 2013 10:07:46 -0400
From: Brian Stephens <bws001 at gmail.com>
Subject: Relational databases/ OBDC connections...
To: powerh-l at lists.sowder.com
Message-ID:
	<CAPxvv-Uu-HARy3M0vrVsE9WjPpNDW=7v5RQJa53a2qmdj8LdPQ at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.sowder.com/pipermail/powerh-l/attachments/20130611/73ee3647/at
tachment.html>

------------------------------

Message: 2
Date: Tue, 11 Jun 2013 10:52:55 -0400
From: Bob Deskin <Bob.Deskin at ca.ibm.com>
Subject: Re: Relational databases/ OBDC connections...
To: Brian Stephens <bws001 at gmail.com>
Cc: powerh-l-bounces+bob.deskin=ca.ibm.com at lists.sowder.com,
	powerh-l at lists.sowder.com
Message-ID:
	
<OF25A45703.D76F3BC8-ON85257B87.005187B5-85257B87.0051C0DD at ca.ibm.com>
Content-Type: text/plain; charset="us-ascii"

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 &lt;password&gt;' 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/20130611/95c29abc/at
tachment-0001.htm>

------------------------------

Message: 3
Date: Tue, 11 Jun 2013 11:52:15 -0400
From: Brian Stephens <bws001 at gmail.com>
Subject: Re: Relational databases/ OBDC connections...
To: powerh-l at lists.sowder.com
Message-ID:
	<CAPxvv-XUoHNDgHs7SWAA-FvULznPZ6rCpyNEZtwLOA+UsnbAwA at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

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 &lt;password&gt;' 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.
>



-- 
Thanks

Brian Stephens
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.sowder.com/pipermail/powerh-l/attachments/20130611/7ed8aa8a/at
tachment-0001.htm>

------------------------------

--
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l at lists.sowder.com
Subscribe: &quot;subscribe&quot; in message body to
powerh-l-request at lists.sowder.com
Unsubscribe: &quot;unsubscribe &lt;password&gt;&quot; 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.

End of powerh-l Digest, Vol 95, Issue 2
***************************************


------------------------------

--
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l at lists.sowder.com
Subscribe: &quot;subscribe&quot; in message body to
powerh-l-request at lists.sowder.com
Unsubscribe: &quot;unsubscribe &lt;password&gt;&quot; 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.

End of powerh-l Digest, Vol 95, Issue 3
***************************************



More information about the powerh-l mailing list