<br>
<br>
<table width=100%>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">From:</font>
<td><font size=1 face="sans-serif">Kenneth S Mclane/Dubuque/IBM@IBMUS</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">To:</font>
<td><font size=1 face="sans-serif">&quot;The elegant MVC web framework&quot;
&lt;catalyst@lists.scsys.co.uk&gt;</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Date:</font>
<td><font size=1 face="sans-serif">03/28/2012 08:27 AM</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Subject:</font>
<td><font size=1 face="sans-serif">Re: [Catalyst] DB2 Connection string
problem</font></table>
<br>
<hr noshade>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=12%><font size=1 color=#5f5f5f face="sans-serif">From:</font><font size=3>
</font>
<td width=87%><font size=1 face="sans-serif">&quot;Cosimo Streppone&quot;
&lt;cosimo@streppone.it&gt;</font><font size=3> </font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">To:</font><font size=3>
</font>
<td><font size=1 face="sans-serif">Kenneth S Mclane/Dubuque/IBM@IBMUS</font><font size=3>
</font>
<tr>
<td valign=top><font size=1 color=#5f5f5f face="sans-serif">Cc:</font><font size=3>
</font>
<td><font size=1 face="sans-serif">&quot;The elegant MVC web framework&quot;
&lt;catalyst@lists.scsys.co.uk&gt;</font><font size=3> </font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Date:</font><font size=3>
</font>
<td><font size=1 face="sans-serif">03/28/2012 03:59 AM</font><font size=3>
</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Subject:</font><font size=3>
</font>
<td><font size=1 face="sans-serif">Re: [Catalyst] DB2 Connection string
problem</font></table>
<br><font size=3><br>
</font>
<hr noshade><font size=3><br>
<br>
</font><tt><font size=2><br>
On Tue, 27 Mar 2012 21:32:12 +0200, Kenneth S Mclane &lt;ksmclane@us.ibm.com&gt;
&nbsp;<br>
wrote:<br>
<br>
&gt; am able to connect from Perl directly with a quick test file I wrote.<br>
<br>
Ok, then you're 99% done.<br>
<br>
&gt; I just cannot figure out how Catalyst passes/parses the arguments.<br>
<br>
Maybe you could start by posting your working perl code<br>
and then people on the list can help you transpose<br>
that to the relevant Catalyst parts/plugins?<br>
<br>
Just an idea.<br>
<br>
-- <br>
Cosimo<br>
<br>
Here is my perl script that connects:</font></tt><font size=3> <br>
</font><tt><font size=2 color=#9f000f><br>
#!/usr/bin/perl</font></tt><font size=3> </font><tt><font size=2 color=#8100ff><br>
use </font></tt><tt><font size=2>DBI</font></tt><tt><font size=2 color=#a11f12>;</font></tt><font size=3>
</font><tt><font size=2 color=#8100ff><br>
use </font></tt><tt><font size=2>DBD::DB2::Constants</font></tt><tt><font size=2 color=#a11f12>;</font></tt><font size=3>
</font><tt><font size=2 color=#8100ff><br>
use </font></tt><tt><font size=2>DBD::DB2</font></tt><tt><font size=2 color=#a11f12>;</font></tt><font size=3>
<br>
</font><tt><font size=2><br>
$</font></tt><tt><font size=2 color=#8100ff>db</font></tt><tt><font size=2 color=#a11f12>=</font></tt><tt><font size=2 color=blue>&quot;dbname&quot;</font></tt><tt><font size=2 color=#a11f12>;</font></tt><font size=3>
</font><tt><font size=2><br>
$</font></tt><tt><font size=2 color=#8100ff>hostname</font></tt><tt><font size=2 color=#a11f12>=</font></tt><tt><font size=2 color=blue>&quot;server.fqdn&quot;</font></tt><tt><font size=2 color=#a11f12>;</font></tt><font size=3>
</font><tt><font size=2><br>
$</font></tt><tt><font size=2 color=#8100ff>port</font></tt><tt><font size=2 color=#a11f12>=</font></tt><tt><font size=2 color=blue>&quot;55555&quot;</font></tt><tt><font size=2 color=#a11f12>;</font></tt><font size=3>
</font><tt><font size=2><br>
$</font></tt><tt><font size=2 color=#8100ff>user</font></tt><tt><font size=2 color=#a11f12>=</font></tt><tt><font size=2 color=blue>&quot;user&quot;</font></tt><tt><font size=2 color=#a11f12>;</font></tt><font size=3>
</font><tt><font size=2><br>
$</font></tt><tt><font size=2 color=#8100ff>pass</font></tt><tt><font size=2 color=#a11f12>=</font></tt><tt><font size=2 color=blue>&quot;password&quot;</font></tt><tt><font size=2 color=#a11f12>;</font></tt><font size=3>
</font><tt><font size=2><br>
$</font></tt><tt><font size=2 color=#8100ff>string</font></tt><tt><font size=2>
</font></tt><tt><font size=2 color=#a11f12>= </font></tt><tt><font size=2 color=blue>&quot;dbi:DB2:DATABASE=$db;
HOSTNAME=$hostname; PORT=$port; PROTOCOL=TCPIP;&quot;</font></tt><tt><font size=2 color=#a11f12>;</font></tt><font size=3>
<br>
</font><tt><font size=2 color=#8100ff><br>
if </font></tt><tt><font size=2 color=#a11f12>(</font></tt><tt><font size=2>$</font></tt><tt><font size=2 color=#8100ff>dbh</font></tt><tt><font size=2>
</font></tt><tt><font size=2 color=#a11f12>= </font></tt><tt><font size=2>DBI</font></tt><tt><font size=2 color=#a11f12>-&gt;</font></tt><tt><font size=2 color=#8100ff>connect</font></tt><tt><font size=2 color=#a11f12>(</font></tt><tt><font size=2>$</font></tt><tt><font size=2 color=#8100ff>string</font></tt><tt><font size=2 color=#a11f12>,
</font></tt><tt><font size=2>$</font></tt><tt><font size=2 color=#8100ff>user</font></tt><tt><font size=2 color=#a11f12>,
</font></tt><tt><font size=2>$</font></tt><tt><font size=2 color=#8100ff>pass</font></tt><tt><font size=2 color=#a11f12>))
{</font></tt><font size=3> </font><tt><font size=2 color=#a11f12><br>
 &nbsp; &nbsp; &nbsp; &nbsp;</font></tt><tt><font size=2 color=#8100ff>print
</font></tt><tt><font size=2 color=blue>&quot;Success!&quot;</font></tt><tt><font size=2 color=#a11f12>;</font></tt><font size=3>
</font><tt><font size=2 color=#a11f12><br>
} </font></tt><tt><font size=2 color=#8100ff><br>
else </font></tt><tt><font size=2 color=#a11f12>{</font></tt><font size=3>
</font><tt><font size=2 color=#a11f12><br>
 &nbsp; &nbsp; &nbsp; &nbsp;</font></tt><tt><font size=2 color=#8100ff>print
</font></tt><tt><font size=2 color=blue>&quot;Connection failed with error:
$DBI::errstr&quot;</font></tt><tt><font size=2 color=#a11f12>;</font></tt><font size=3>
</font><tt><font size=2 color=#a11f12><br>
}</font></tt><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
I am trying to use the MyApp_create.pl script to create the db model and
pull in the entire existing schema, but cannot get the script to function
correctly, it either will not connect or gives an error about not finding
the db on the &quot;filesystem&quot;. Yet the above script indicates success
when run from the same VM I am using for Catalyst.</font><tt><font size=2>_______________________________________________<br>
</font></tt>
<br>
<br><font size=2 face="sans-serif">Update, I was successful in creating
a connection. For future reference if anyone else is trying to accomplish
this:</font>
<br>
<br><a href="http://www-01.ibm.com/support/docview.wss?uid=swg21182248"><font size=2 face="sans-serif">http://www-01.ibm.com/support/docview.wss?uid=swg21182248</font></a>
<br>
<br><font size=2 face="sans-serif">This page has instructions for cataloging
db's on a remote system. Once this is done and an alias created, I was
able to get the create script to connect using the alias. Note, if you
are on a *nix system, db2 should not be typed in all caps as the example,
this was done on a Win box. </font>
<br>
<br><font size=2 face="sans-serif">I now have a different problem as the
schema still isn't being created.</font>
<br>
<br><font size=2 face="sans-serif">Unable to load schema - chosen moniker/class
naming style results in moniker clashes. Change the naming style, or supply
an explicit moniker_map: tables &quot;db1&quot;.&quot;ASSIGNMENT&quot;,
&quot;db2&quot;.&quot;ASSIGNMENTS&quot; reduced to the same source moniker
'Assignment'</font>
<br>
<br><font size=2 face="sans-serif">Off to research this one. Thanks for
the help.</font>
<br>