> -----Original Message-----
> From: Joe Raube [mailto:[EMAIL PROTECTED]]
>
>
> I think that if you posted some code, we could give better assistance
> with this matter.....
This is the code that I am using to connect but if I am unable to send server messages from the DBI then I could code it to strip the control characters before writing to the file. I do not need to know how to do this but I thought the code although no shining example may help others.
#!Perl
# This program was written to be run on a Windows box not Unix
#
use warnings;
use strict;
use Harry::Connect;
my @table_name;
my $region;
foreach $region ( "csr_uk", "csr_de", "csr_at", "csr_it", "csr_ei",
"csr_fr", "csr_es", "csr_ch", "csr_nl", "csr_be",
"csr_nx", "csr_uk", "csr_int") {
my $dbh = ConnectToOracle($region) or die "shit";
open (OUTPUT, ">c:\\Worldcom_$region.csv") or die ("Cannot open file: $!");
my $sth = $dbh->prepare("select distinct a.customer_id,
a.a_side_customer,
a.z_side_customer,
a.circ_path_hum_id,
a.status,
a.bandwidth,
a.type,
substr(b.site_hum_id, 1, instr(b.site_hum_id, '_', 1, 4) - 1),
substr(c.site_hum_id, 1, instr(c.site_hum_id, '_', 1, 4) - 1)
from $region.circ_path_inst a, $region.site_inst b, $region.site_inst c
where a.a_side_site_id = b.site_inst_id
and a.z_side_site_id = c.site_inst_id
and (a.customer_id like '%xxxxx%'
or a.customer_id like '%xxxxxx%'
or a.a_side_customer like '%xxxxxx%'
or a.a_side_customer like '%xxxxxx%'
or a.z_side_customer like '%xxxxxx%'
or a.z_side_customer like '%xxxxxx%')
");
$sth->execute() || die "Execution of the SQL FAILED $!";
while (@table_name = $sth->fetchrow_array()) {
print OUTPUT ("$table_name[0],$table_name[1],$table_name[2],$table_name[3],
$table_name[4],$table_name[5],$table_name[6]$table_name[7],
$table_name[8],$table_name[8]\n")
or die ("Cannot output to OUTPUT filehandle: $!");
}
# Finish with DBI
#
$sth->finish()
or die "Unable to finish: $!";
# Disconnect from Database
#
$dbh->disconnect()
or die "Unable to Disconnect: $!";
}
close (OUTPUT);
exit 0;
*************************************************************************************
COLT Telecommunications
Registered in England No. 2452736
Registered Office: Bishopsgate Court, 4 Norton Folgate, London E1 6DQ
Tel. +44 20 7390 3900
This message is subject to and does not create or vary any contractual
relationship between COLT Telecommunications, its subsidiaries or
affiliates ("COLT") and you. Internet communications are not secure
and therefore COLT does not accept legal responsibility for the
contents of this message. Any view or opinions expressed are those of
the author. The message is intended for the addressee only and its
contents and any attached files are strictly confidential. If you have
received it in error, please telephone the number above. Thank you.
*************************************************************************************
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]