<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word"><head><META content="text/html; charset=utf-8" http-equiv="Content-Type">
<STYLE><!-- /* Style Definitions */ p.e474e2cd-8d21-44a0-8982-f3cca6c7d1ed, li.e474e2cd-8d21-44a0-8982-f3cca6c7d1ed, div.e474e2cd-8d21-44a0-8982-f3cca6c7d1ed, table.e474e2cd-8d21-44a0-8982-f3cca6c7d1edTable         {margin:0cm;        margin-bottom:.0001pt;} div.Section1 {page:Section1;} --></STYLE>
<meta content="text/html; charset=utf-8" http-equiv=Content-Type><meta content="Microsoft Word 14 (filtered medium)" name=Generator><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:r_ansi;
        panose-1:2 11 6 9 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
tt
        {mso-style-priority:99;
        font-family:"Courier New";}
span.hoenzb
        {mso-style-name:hoenzb;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><BODY><div class=WordSection1><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'>We run our Powerhouse application on different environments. <o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'>On AIX/Oracle environment we use the following in our PDL so we can connect to different database/schema:<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Calibri","sans-serif"'> Database mydatabase &<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Calibri","sans-serif"'> Description "My Database" &<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'> Open "<b><span style='color:#C00000'>ORACLE@$DBTAG</span></b>" </span><span style='font-family:Wingdings'>à</span><span style='font-family:"Calibri","sans-serif"'> I think it is “ODBC@$<variable>” for ODBC connections.<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'>AIX/Unix variable <b><span style='color:#C00000'>DBTAG</span></b> is set differently on different systems/environments as <username>@<database>/<password> <o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'>Unix command to set DBTAG variable:<o:p></o:p></span></p><p class=MsoNormal><b><span style='font-family:"Calibri","sans-serif";color:#C00000'>export DBTAG=<username>@<database>/<password><o:p></o:p></span></b></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'>When you compile programs you should use the following compile switches so the program could access the database specified in $DBTAG variable:<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'>quiz subdict=search cc={UNIX,ORACLE} <b><span style='color:#C00000'>noprefix_openname nolist owner=<username> noowner</span></b><span style='color:#C00000'> </span>auto=<program name>.qzs<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'>Example:<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'>DBTAG on the system where the code is compiled: abc@DB1/password<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'>quiz subdict=search cc={UNIX,ORACLE} noprefix_openname nolist owner=<b><span style='color:#C00000'><abc> noowner </span></b>auto=<program name><o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'>DBTAG on the client system: xyz@DBx/password<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'>quiz auto=<programname>.qzc </span><span style='font-family:Wingdings'>à</span><span style='font-family:"Calibri","sans-serif"'> should work fine. <o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'>We switch to different database/schema by simply changing the DBTAG variable. Unfortunately you cannot do this from within a powerhouse application program.<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'>Hope that helps!<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'><br>Sagar Goparaju<br><br><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> powerh-l-bounces+vidyasagar.goparaju=kewill.com@lists.sowder.com [mailto:powerh-l-bounces+vidyasagar.goparaju=kewill.com@lists.sowder.com] <b>On Behalf Of </b>Brian Stephens<br><b>Sent:</b> Tuesday, June 11, 2013 10:52 AM<br><b>To:</b> powerh-l@lists.sowder.com<br><b>Subject:</b> Re: Relational databases/ OBDC connections...<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div><div><div><div><div><div><div><div><p class=MsoNormal>This is a legacy app that I'm not wanting to change..<o:p></o:p></p></div><div><p class=MsoNormal><br>I have a database say a product catalog that is used throughout the sister compnaies have identical databases.<o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p></div><p class=MsoNormal style='margin-bottom:12.0pt'>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..<o:p></o:p></p></div><p class=MsoNormal style='margin-bottom:12.0pt'>I need some mechanism to point to the different databases..<br><br><o:p></o:p></p></div><p class=MsoNormal>There are actually 2 problems<o:p></o:p></p></div><div><p class=MsoNormal>ACCESS PRODUCTS on the HP<o:p></o:p></p></div><div><p class=MsoNormal>becomes <o:p></o:p></p></div><div><p class=MsoNormal>ACCESS Schema.PRODUCTS in COMPANYA<o:p></o:p></p></div><div><p class=MsoNormal style='margin-bottom:12.0pt'><br><br><o:p></o:p></p></div><p class=MsoNormal style='margin-bottom:12.0pt'>I can select which OBDC driver is attached.. <br><br>> DATABASE COMPANY &<br>> Type ODBC &<br>> Open $COMPANY &<br>> UserID "********" &<br>> Password "********"<o:p></o:p></p></div><p class=MsoNormal>It works fine but <o:p></o:p></p></div><p class=MsoNormal style='margin-bottom:12.0pt'>the ODBC or DB2 is adding the schema to the table name which takes away the uniqueness <br><br>show files<br>TEST2.CUSTOMER IN COMPANYA<o:p></o:p></p><div><div><p class=MsoNormal><o:p> </o:p></p></div></div></div><div><p class=MsoNormal style='margin-bottom:12.0pt'><o:p> </o:p></p><div><p class=MsoNormal>On Tue, Jun 11, 2013 at 10:52 AM, Bob Deskin <<a href="mailto:Bob.Deskin@ca.ibm.com" target="_blank">Bob.Deskin@ca.ibm.com</a>> wrote:<o:p></o:p></p><p class=MsoNormal><span style='font-family:"Arial","sans-serif"'>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.</span> <br><br><span style='font-family:"Arial","sans-serif"'>Bob</span> <br><br><br><br><span style='font-size:7.5pt;font-family:"Arial","sans-serif";color:#5F5F5F'>From: </span><span style='font-size:7.5pt;font-family:"Arial","sans-serif"'>Brian Stephens <<a href="mailto:bws001@gmail.com" target="_blank">bws001@gmail.com</a>></span> <br><span style='font-size:7.5pt;font-family:"Arial","sans-serif";color:#5F5F5F'>To: </span><span style='font-size:7.5pt;font-family:"Arial","sans-serif"'><a href="mailto:powerh-l@lists.sowder.com" target="_blank">powerh-l@lists.sowder.com</a>, </span><br><span style='font-size:7.5pt;font-family:"Arial","sans-serif";color:#5F5F5F'>Date: </span><span style='font-size:7.5pt;font-family:"Arial","sans-serif"'>2013-06-11 10:22 AM</span> <br><span style='font-size:7.5pt;font-family:"Arial","sans-serif";color:#5F5F5F'>Subject: </span><span style='font-size:7.5pt;font-family:"Arial","sans-serif"'>Relational databases/ OBDC connections...</span> <br><span style='font-size:7.5pt;font-family:"Arial","sans-serif";color:#5F5F5F'>Sent by: </span><span style='font-size:7.5pt;font-family:"Arial","sans-serif"'>powerh-l-bounces+bob.deskin=<a href="mailto:ca.ibm.com@lists.sowder.com" target="_blank">ca.ibm.com@lists.sowder.com</a></span> <o:p></o:p></p><div align=center class=MsoNormal style='text-align:center'><hr align=center noshade size=2 style='color:#A0A0A0' width="100%"></div><p class=MsoNormal><br><br><br>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) <br>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..<br><br><br>Our platform is windows and the target database is DB2 on iSeries via ODBC..<br><br><br>It doesn't appear I can insert a system variable in the ACCESS statement <br><br>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..<br><br>PS i'm just a bit fuzzy... taking a week to move and driving 2700 km can do that too you.. <br><span style='color:#888888'><br><br><br><span class=hoenzb>-- </span><br><span class=hoenzb>Thanks</span><br><br><span class=hoenzb>Brian Stephens </span></span><tt><span style='font-size:10.0pt;color:#888888'>--</span></tt><span style='font-size:10.0pt;font-family:"Courier New";color:#888888'><br><tt>= = = = = = = = = = = = = = = = = = = = = = = = = = = =</tt><br><tt>Mailing list: <a href="mailto:powerh-l@lists.sowder.com" target="_blank">powerh-l@lists.sowder.com</a></tt><br><tt>Subscribe: 'subscribe' in message body to <a href="mailto:powerh-l-request@lists.sowder.com" target="_blank">powerh-l-request@lists.sowder.com</a></tt><br><tt>Unsubscribe: 'unsubscribe &lt;password&gt;' in message body to <a href="mailto:powerh-l-request@lists.sowder.com" target="_blank">powerh-l-request@lists.sowder.com</a></tt><br></span><span class=hoenzb><span style='color:#888888'><a href="http://lists.sowder.com/mailman/listinfo/powerh-l" target="_blank"><tt><span style='font-size:10.0pt'>http://lists.sowder.com/mailman/listinfo/powerh-l</span></tt></a></span></span><span style='font-size:10.0pt;font-family:"Courier New";color:#888888'><br><tt>This list is closed, thus to post to the list you must be a subscriber.</tt><br><tt>Add 'site:<a href="http://lists.sowder.com" target="_blank">lists.sowder.com</a> powerh-l' to your search terms to search the list archive at Google.</tt></span><span class=hoenzb><span style='color:#888888'> </span></span><o:p></o:p></p></div><p class=MsoNormal><br><br clear=all><br>-- <br>Thanks<br><br>Brian Stephens <o:p></o:p></p></div></div><FONT COLOR="silver" FACE="Verdana" SIZE="1">
<P CLASS="e474e2cd-8d21-44a0-8982-f3cca6c7d1ed"><SPAN STYLE="FONT-SIZE: 8pt; FONT-FAMILY: Arial"><FONT COLOR="#000000"><FONT COLOR="#333333" SIZE="1"></FONT></FONT></SPAN> </P><SPAN STYLE="FONT-SIZE: 8pt; FONT-FAMILY: Arial"><FONT COLOR="#000000"><FONT COLOR="#333333" SIZE="1">
<P CLASS="MsoNormal" STYLE="MARGIN: 0in 0in 0pt"><SPAN STYLE="FONT-SIZE: 8pt; COLOR: navy; FONT-FAMILY: Arial">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.</SPAN><SPAN STYLE="FONT-SIZE: 8pt; FONT-FAMILY: Arial"></SPAN></P></FONT></FONT></SPAN></FONT></BODY></HTML>