Can anyone see aproblem with my basic logic in this code?
When I run it. I get this for the prints:
It does not seem to be getting the default loop. WHile it may be possible that it find a natch for every record. I suspect it would not.
Thanks
I got a Biz Degree! How the h*ll did I get here?
Code:
foreach $prob (@problem) { # Start Problem Table loop
chomp $prob;
my ($company, $logical_name, $numberprgn, $assignment, $uis_elapsed_start_time, $close_time, $res_anal_code,
$user_priority, $severity_code ) = split (/,/, $prob);
foreach $dev (@device) { # Start Device Table loop.
#
# Device Table Processing
#
chomp $dev;
($log_name, $type, $subtype, $uis_support_level, $uis_tier, $uis_fstatus, $uis_managed_date, $uis_deactivated_date ) = split (/,/, $dev);
$match_cnt = 0;
next unless ($log_name eq $logical_name);
#
# Merge it all
#
$match_cnt++;
$dev_loop_cnt++;
#print LOG "$assignment, $res_anal_code, $user_priority, $severity_code, $type, $uis_support_level, $uis_tier, $uis_fstatus\n";
push (@data, $assignment, $res_anal_code, $user_priority, $severity_code, $type, $uis_support_level, $uis_tier, $uis_fstatus);
} # End device table loop
if ($match_cnt = "0") {
push (@data, $assignment, $res_anal_code, $user_priority, $severity_code, $type, $uis_support_level, $uis_tier, $uis_fstatus);
$nomatch_cnt++;
} # End default loop
}
print LOG "Found $dev_loop_cnt matching record from DEVICE and PROBLEM Tables\n";
print LOG "Generated $nomatch_cnt records using defaults\n\n";
When I run it. I get this for the prints:
Code:
Found 466 matching record from DEVICE and PROBLEM Tables
Generated 0 records using defaults
It does not seem to be getting the default loop. WHile it may be possible that it find a natch for every record. I suspect it would not.
Thanks
I got a Biz Degree! How the h*ll did I get here?