C
chris
I am running the following script on perl, v5.8.4 built for
MSWin32-x86-multi-thread (activestate). The script runs but seems to
hang every now and then and won't continue until I press enter. E.g.:
Processing DE 200407
Processing DE 200408
Do I need to flush buffers or something?
Many thanks,
Chris
----------
#!/usr/bin/perl -w
use strict;
use DBD::ODBC;
use util::YYYYMM;
my $start = 200402;
my $end = 200410;
my $range_list = range( $start, $end );
foreach my $opco ( qw[ IE UK DE IT GR ES ] ) {
foreach my $yyyymm (@$range_list) {
LOAD: {
print "Processing $opco $yyyymm\n";
my $dbh = DBI->connect('dbi:ODBC:XXXXX', 'XXXXX', 'XXXXX')
or redo LOAD;
my $sth = $dbh->prepare("exec m_run ( '$opco', $yyyymm );")
or redo LOAD;
$sth->execute or redo LOAD;
$dbh->disconnect;
}
}
}
my $yyyymm_plus_one = yyyymm_add( $end );
my $sth = $dbh->prepare("exec m_run_report ( $yyyymm_plus_one );");
$sth->execute;
MSWin32-x86-multi-thread (activestate). The script runs but seems to
hang every now and then and won't continue until I press enter. E.g.:
Processing DE 200407
Processing DE 200408
Processing DE 200409Hang - Press [enter] <<
Do I need to flush buffers or something?
Many thanks,
Chris
----------
#!/usr/bin/perl -w
use strict;
use DBD::ODBC;
use util::YYYYMM;
my $start = 200402;
my $end = 200410;
my $range_list = range( $start, $end );
foreach my $opco ( qw[ IE UK DE IT GR ES ] ) {
foreach my $yyyymm (@$range_list) {
LOAD: {
print "Processing $opco $yyyymm\n";
my $dbh = DBI->connect('dbi:ODBC:XXXXX', 'XXXXX', 'XXXXX')
or redo LOAD;
my $sth = $dbh->prepare("exec m_run ( '$opco', $yyyymm );")
or redo LOAD;
$sth->execute or redo LOAD;
$dbh->disconnect;
}
}
}
my $yyyymm_plus_one = yyyymm_add( $end );
my $sth = $dbh->prepare("exec m_run_report ( $yyyymm_plus_one );");
$sth->execute;