Loop
$restart=0
$junk=open(1, $outputdir+ "\joblist.txt", 2)
;Check jobs run since last checktime for failures
$x=Readline(1)
Do
$array3=split("$x", ",")
$jobid=$array3[0]
$type=$array3[1]
$state=$array3[2]
$status=$array3[3]
$policy=$array3[4]
$client=$array3[6]
$starttime=ctime($array3[8],-$timezone)
$endtime=ctime($array3[10],-$timezone)
$runtime=$array3[9]
$PlaceHolder=$array3[17]
if "$jobid"<>"$lastjob"
if $type="0" or $type="1"
If $state="3"
if $status="0" or $status="" or $status="190" or $status="191" or $status="150"
else
if $status="1"
$junk=Writeline(8, "$client - $policy - Status: $status End time: $endtime" + Chr(13) + Chr(10))
else
$junk=Writeline(2, "$client - $policy - Status: $status End time: $endtime" + Chr(13) + Chr(10))
endif
endif
else
$junk=Writeline(3, "$jobid" + Chr(13) + Chr(10))
endif
endif
endif
$x=readline(1)
Until $jobid<=$lastjob