C:\home\interface\scripts>cr_trans_sh.pl PARAM 20080805
Useless use of private variable in void context at C:\home\interface\scripts\cr_
trans_sh.pl line 317.
2008 is a leap year!!!
Sub::date_validation:: Ends Okay
The directory in use is E:/Consilium/tasktalk/interfaces/GT-E-ABEC01-CED
AR-005-CREDINV/out
sectran: using method PUT_MD5
sectran: transfer attempts will timeout at Thu Aug 14 10:17:35 2008
sectran:
sectran: transfer commencing at Thu Aug 14 10:17:15 2008 ...
sectran: using put method MD5
sectran: ftp connection established with gala
sectran: ifmscron login accepted
sectran: set to ascii mode
sectran: directory changed to /ifs/spp/spool/IFSLIVE/dataload/cred/in
sectran: put E:/Consilium/tasktalk/interfaces/GT-E-ABEC01-CEDAR-005-CREDINV/out/
cr_analysis.2008080501 as /ifs/spp/spool/IFSLIVE/dataload/cred/in/xxrc_total.cr_
analysis.2008080501_d075470e49f78dcff9963982a370e70c successful
sectran: ftp session ended with success
Aboot tae send the return value!
C:\home\interface\scripts>
####
# Put file(s) - MD5
###################
if ( ($returnval >= 0) && ($method eq "MD5") ) {
my ($lsfile);
my (@All);
my ($match_file)=$loc_file;
opendir (DIR, $loc_dir) or endit("could not find local directory");
# Convert standard wildcards to regexps
$match_file =~ s/\*/\.\*/;
$match_file =~ s/\?/\./;
my ($fname);
while (defined ($lsfile = readdir DIR))
{
push (@All, $lsfile) if $lsfile =~ /^$match_file$/;
}
closedir DIR;
if ( ($rem_file) && ($#All gt 0 ) ) {
printit("specified to rename remote file but more than one matching local file");
$returnval=-1;
}
else
{
foreach $fname (@All) {
my ($locname);
my ($remname);
$locname = $fname;
if ($rem_file) {
$remname = $rem_file;
}
else
{
$remname = $fname;
}
if ($loc_dir) {
$locname = $loc_dir . '/' . $locname;
}
$locname=~s/\/\//\//g;
if ($rem_dir) {
$remname = $rem_dir . '/' . $remname;
}
$remname=~s/\/\//\//g;
my ($md5sum)=generate_md5($locname);
if ($md5sum eq -1) {
printit("md5 checksum generation failed");
$returnval=-1;
}
else
{
$remname = $remname . "_" . $md5sum;
if ($ftp->put($locname,$remname)) {
printit("put $locname as $remname successful");
}
else
{
printit("failed to put $locname as $remname");
$returnval=-1;
}
}
}
}
}
# Close session
###############
$ftp->quit;
if ($returnval >= 0) {
printit("ftp session ended with success");
} else {
printit("ftp session ended with failure");
}
print "\n\t Aboot tae send the return value!\n" ;
return $returnval;
print "\n\t I dinna expect tae see this message!!\n" ;
}
####
foreach $file (@ftp_files) {
$rem_file = 'xxrc_total.' . $file ;
$renamed_file = $transferred_dir . '/' . $file ;
$msg = "Transferring file $file as $rem_file" ;
&update_report("$logfile","$msg",1,1,0) or &end_it($mail_msg,$to,$from,$subject,$msg,$text,$attachments) ;
$msg = "<***** Sectran was unable to transfer $file *****>." ;
$result = sectran::sectran('CRTRANSSHPARAMS',"$rem_file","$file");
print "\n\t\tWe never get to this point do we?!\n" ;
if ($result != 0) {
&ACC_BOX($msg,$logfile) or &end_it($mail_msg,$to,$from,$subject,$msg,$text,$attachments) ;
&end_it($mail_msg,$to,$from,$subject,$msg,$null,$logfile) ;
}
$msg = "File $file has been transferred successfully" ;
&update_report("$logfile","$msg",1,1,0) or &end_it($mail_msg,$to,$from,$subject,$msg,$text,$attachments) ;