environment variable

2007-01-17 Thread Oscar Gomez
how can i export a variable from program perl to shell script through 
environment 
variable.

Thank you

--
Open WebMail Project (http://openwebmail.org)



RE: DBD::DB2 question need an example

2007-01-17 Thread Brimacomb, Brent
I was finally able to get the version 1.0 of the DBD::DB2 installed, but
am still getting the same error as before?   Any more ideas, I'll try
anything.

Brent


C:\Perl>perl aactss.pl
Subroutine AUTOLOAD redefined at c:/Perl/site/lib/DBD/DB2/CONSTANTS.pm
line
1563 (#1)
(W redefine) You redefined a subroutine.  To suppress this warning,
say

{
no warnings 'redefine';
eval "sub name { ... }";
}

Operating System = MSWin32
Perl Binary  = c:\Perl\bin\perl.exe
Perl Version = 5.008008
DBI Version  = 1.53
DBD::DB2 Version = 1.0

Available DB2 DSNs:

DBI connect('dsn2.prdplexa.sabre.com','Z156505',...) failed: [IBM][CLI
Driver] C
LI0124E  Invalid argument value. SQLSTATE=HY009 at aactss.pl line 67
Uncaught exception from user code:
Connection failed with error: [IBM][CLI Driver] CLI0124E
Invalid argume
nt value. SQLSTATE=HY009 at aactss.pl line 67.
 at aactss.pl line 67

C:\Perl>
 

-Original Message-
From: Kellen F Bombardier [mailto:[EMAIL PROTECTED] On Behalf Of
db2perl
Sent: Monday, January 15, 2007 1:23 PM
To: Brimacomb, Brent
Cc: db2perl; dbi-users@perl.org; Jeffrey Seger
Subject: RE: DBD::DB2 question need an example

Hi Brent,

The problem appears to be that you are using 0.78 version of DBD::DB2.
You will need to update to the latest version for this to work
correctly.




"Brimacomb, Brent" <[EMAIL PROTECTED]> 
01/15/2007 11:38 AM

To
db2perl/Toronto/[EMAIL PROTECTED]
cc
, "Jeffrey Seger" <[EMAIL PROTECTED]>
Subject
RE: DBD::DB2 question need an example






Being new to Perl I'm not sure how to list out the variables you asked
for?
 list node directory 
 list database directory 
get dbm cfg 
 
Below is the complete output of the current program.
 
Thank you!
Brent
 
 
 
 
 
C:\Perl>perl aactss.pl
Subroutine AUTOLOAD redefined at c:/Perl/site/lib/DBD/DB2/CONSTANTS.pm
line
1560 (#1)
(W redefine) You redefined a subroutine.  To suppress this warning,
say
 
{
no warnings 'redefine';
eval "sub name { ... }";
}
 
Operating System = MSWin32
Perl Binary  = c:\Perl\bin\perl.exe
Perl Version = 5.008008
DBI Version  = 1.53
DBD::DB2 Version = 0.78
 
Available DB2 DSNs:
 
DBI connect('dsn2.prdplexa.sabre.com','Z156505',...) failed: [IBM][CLI
Driver] C
LI0124E  Invalid argument value. SQLSTATE=HY009 at aactss.pl line 66
Uncaught exception from user code:
Connection failed with error: [IBM][CLI Driver] CLI0124E
Invalid argume
nt value. SQLSTATE=HY009 at aactss.pl line 66.
 at aactss.pl line 66
 
C:\Perl>
 
 




 From: Kellen F Bombardier [mailto:[EMAIL PROTECTED]
On 
Behalf
Of db2perl
 Sent: Monday, January 15, 2007 11:05 AM
 To: Brimacomb, Brent
 Cc: dbi-users@perl.org; Jeffrey Seger
 Subject: RE: DBD::DB2 question need an example
 
 

 Hi Jeffrey, 
 
 Can you please paste the output from the entire script 
you
provided in the original email (the one that displays the versions of
everything)?  Also, can you run the following commands from the DB2 CLP
and give us the output: 
 
 list node directory 
 list database directory 
 get dbm cfg 
 
 Thanks, 
 
 
 
 
"Brimacomb, Brent" <[EMAIL PROTECTED]> 

01/11/2007 09:19 AM 

To
"Jeffrey Seger" <[EMAIL PROTECTED]> 
cc
 
Subject
RE: DBD::DB2 question need an example

 




 First let me say THANK YOU! for trying to help.   I've 
been
beating my
 head on this one for a couple days now 
 
 I tried what you suggested and basically got the same 
error:
 
 DBI connect('database=USNETAALDSN2','Z156505',...) 
failed:
[IBM][CLI
 Driver] CLI
 0124E  Invalid argument value. SQLSTATE=HY009 at 
aactss.pl line
38
 Uncaught exception from user code:
Connection failed with error: [IBM][CLI Driver] 
CLI0124E
 Invalid argume
 nt value. SQLSTATE=HY009 at aactss.pl line 38.
 at aactss.pl line 38
 
 
 Brent 
 
 -Original Message-
 From: Jeffrey Seger [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, January 10, 2007 7:22 PM
 To: Brimacomb, Brent
 Cc: dbi-users@perl.org
 Subject: Re: DBD::DB2 question need an example
 
 On 1/10/07, Brimacomb, Brent <[EMAIL PROTECTED]> 
wrote:
 > : [IBM][CLI Driver] CLI0124E  Invalid argument value.
SQLSTATE=HY009 
 > at AACTSS.pl line 38 Uncaught exception from user
code:
 > Connection failed with error: [IBM][CLI
Driver]
CLI0124E 
 > Invalid argument value. SQLSTATE=HY009 at AACTSS.pl 
line 38.
   

Re: determining Oracle bind types

2007-01-17 Thread John Scoles
If I am not mistaken DBD will defualt to varchar2 for all placeholder unless 
you tell it otherwise.
Check out Padded Char Fields and Placeholer Binding Attributes in the 
DBD::Oracle POD.
In this case DBD might see this bind as number not a varchar (depeneds on 
the exact NLS settings of you Oracles) so you should tell DBD::Oracle that 
the bind is a varchar2 like this

$sth->bind_param(1, '002-4136482-2424839' ,ORA_VARCHAR2 );

"Steve Sapovits" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
>
> In a SELECT with placeholders, what exactly in trace output
> will tell me the Oracle type a bind argument to execute()
> is being bound as?  I have this output (snippet):
>
>   bind :p1 <== '002-4136482-2424839' (type 0)
>   rebinding :p1 (not-utf8, ftype 1, csid 0, csform 0, inout 0)
>   bind :p1 <== '002-4136482-2424839' (size 19/20/0, ptype 4, otype 1)
>   bind :p1 <== '002-4136482-2424839' (size 19/19, otype 1, indp 0,
>   at_exec 1)
>   bind :p1 <== '002-4136482-2424839' (in, not-utf8, csid 31->0->31,
>   ftype 1, csform 0->0, maxlen 19,
>   maxdata_size 0)
>   dbd_st_execute SELECT (out0, lob0)...
> in  ':p1' [0,0]: len 19, ind 0
>
> I figured otype 1 meant ORA type with value 1 = VARCHAR2?
>
> The symptom is that a series of digits and dashes (like above)
> seems to be bound as something other than a VARCHAR2 according
> to a DBA, and that's making the query run inefficiently.  The
> dash/digit string is the only execute argument; the SELECT has
> a single question mark placeholder to accept it.
>
> -- 
> Steve Sapovits[EMAIL PROTECTED]