package EcomAllcancel; use warnings; use strict; use lib "./feedmodules"; use EcomImportUtilities; sub execute { my $biuw = shift; my $TABLE = 'ecom_allcancel'; my $FILE = 'cmdaycan.data'; my $PATH = "$biuw->{yml}{filepath}/orderinfo/"; my $table_summary = $TABLE . '_summary'; my $DATE_COLUMN = 'date_cancel'; my $ALLOWED_CHANGE = $biuw->{yml}{allcancel_allowed_change}; my $temp_table = $TABLE . '_temp'; my $feedfullpath = $PATH . $FILE; $biuw->{log}->info("\n\n**********\nBegin $TABLE load sequence\n**********\n\n"); my $exception = EcomImportUtilities::ageCheck( biuw => $biuw, feedpath => $feedfullpath, tablename => $TABLE ) unless $biuw->{const}{load_old}; if ($exception->{exception} eq 'outofdate' or $exception->{exception} eq 'stillcopying') { $biuw->{log}->warn("$feedfullpath is out of date. Loading stopped.\n"); return $exception; } elsif ($exception->{exception} eq 'nonexistent') { $biuw->{log}->warn("$feedfullpath does not exist. Loading stopped.\n"); return $exception; } #### my $exception = { table => $tablename, exception => 'nonexistent', data => { file => $filepath, age => 0, nonexistent => 1 } }; return ($exception); }