Batch-Batchrun

 view release on metacpan or  search on metacpan

Batchrun.pm  view on Meta::CPAN

     next if $seen{$stepnum};
     $seen{$stepnum} = 1;
      if ($iterations > 0)
        {
        ($hours) = int($Batch::Batchrun::Stats{$stepnum}{StepTimes}/3600);
        ($minutes) = int(($Batch::Batchrun::Stats{$stepnum}{StepTimes} - ($hours * 3600))/60);
        ($seconds) = int (($Batch::Batchrun::Stats{$stepnum}{StepTimes} - ($hours * 3600) - ($minutes * 60)));
        $connect = sprintf("%2.2d:%2.2d:%2.2d",$hours,$minutes,$seconds);
        ($hours) = int($Batch::Batchrun::Stats{$stepnum}{StepCPUTimes}/3600);
        ($minutes) = int(($Batch::Batchrun::Stats{$stepnum}{StepCPUTimes} - ($hours * 3600))/60);
        ($seconds) = ($Batch::Batchrun::Stats{$stepnum}{StepCPUTimes} - ($hours * 3600) - ($minutes * 60));
        ($hundreds) = ($Batch::Batchrun::Stats{$stepnum}{StepCPUTimes} - ($hours * 3600) - ($minutes * 60) - $seconds);

        $cpu = sprintf("%2.2d:%2.2d:%04.2f",$hours,$minutes,$seconds);
        $status = $Batch::Batchrun::Stats{$stepnum}{Status};
        $status = 'Success' if ($status == $Batch::Batchrun::NoErrors);
        $status = 'Error  ' if ($status == $Batch::Batchrun::ErrorCode);
        $status = 'Warning' if ($status == $Batch::Batchrun::WarningCode);
        $cmd = $Batch::Batchrun::Stats{$stepnum}{'CommandName'};
        if ($cmd =~ /^DO|^GOSUB/io)
          {
          #$iterations = $Batch::Batchrun::Stats{$stepnum}{'LoopIterations'};
          $iterations-- if $iterations > 1;
          }
        $iterations = '' if $iterations < 2;
        #else
         # {
         # $iterations = '';
         # }

        write;
        }

     }
   print "     ----------------------------------------------------------------------\n"; 
   print "     Task: $Batch::Batchrun::Control{$Batch::Batchrun::Counter}{'TASK'} ",
             " Application: $Batch::Batchrun::Control{$Batch::Batchrun::Counter}{'APP'} \n";
   print "     Total Task Time: $time_date     Completed: $timestr \n";
   print "     ######################################################################\n";      

}
        
1;
__END__

# Autoload methods go after =cut, and are processed by the autosplit program.

# Below is the stub of documentation for your module. You better edit it!

=head1 NAME

Batch::Batchrun - Batch Control language

=head1 SYNOPSIS

  use Batch::Batchrun;
  blah blah blah

=head1 DESCRIPTION

Stub documentation for Batch::Batchrun was created by h2xs. It looks like the
author of the extension was negligent enough to leave the stub
unedited.

Blah blah blah.

=head1 AUTHOR

A. U. Thor, a.u.thor@a.galaxy.far.far.away

=head1 SEE ALSO

perl(1).

=cut



( run in 1.055 second using v1.01-cache-2.11-cpan-0bb4e1dffa6 )