This is better way to write JOBSTATUS
sub JOBSTATUS {
my %foo = (
1 => "RUNNING",
3 => "STARTING",
4 => "SUCCESS",
5 => "FAILURE",
6 => "TERMINATED",
7 => "ON_ICE",
8 => "INACTIVE",
9 => "ACTIVATED",
10 => "RESTART",
11 => "ON_HOLD",
12 => "QUE_WAIT",
);
return $foo{ $_[0] };
}
While you're changing EVENTSTCODE , see
reasons to avoid $jstatus1,$jstatus2....
All your programs should start with
Use strict warnings and diagnostics or die ( Alternate title: Read this if you want to cut your development time in half! )