Hi, here is my predicament.
I'm running a number of reports and sometimes capture stops transmitting anything in the middle of one job and instead of running reports all night, I come in in the morning and find it stopped on one of the reports. I want to make it so that I can timeout if the report doesn't finish, or if it looks like we're not getting any more line activity.
here's what I'm doing now, which causes it to hang forever if the line activity goes away..
waitfor "REPORT COMPLETE" FOREVER
I'm trying to make it so that if there is no line activity it can abort the current report and then go place another call and process another one.
I am trying a "while 1" loop and only bail out when the "REPORT COMPLETE" has surfaced, or, the capture has gone
idle indicating that no input is coming through over the line so I can start processing the next job. What happens is that the REPORT COMPLETE will occur and be waiting for a carriage return from me and the code path that will execute is the ; CAPTURE IS IDLE
Does anyone have a possible suggestion for me? I'm still digging and reading, but I'm getting frustrated.. thanks
proc WaitForCompleteOrIdle
while 1
; Has the report been generated?
waitfor "REPORT COMPLETE" 1
if SUCCESS
; "REPORT COMPLETE EXIT WHILE" )
exitwhile ; The report has been generated
else
; "REPORT NOT COMPLETE" )
endif
; Has capture not given us anything for 15 secs?
waitquiet 15 30 ; waitquiet reports FAILURE when capture is still active
if SUCCESS
; CAPTURE IS IDLE
disconnect ; hang up..
call retry_line_later ; retry current job later
exitwhile ;
else
; CAPTURE IS NOT IDLE
endif
endwhile
endproc ; WaitForCompleteOrIdle
I'm running a number of reports and sometimes capture stops transmitting anything in the middle of one job and instead of running reports all night, I come in in the morning and find it stopped on one of the reports. I want to make it so that I can timeout if the report doesn't finish, or if it looks like we're not getting any more line activity.
here's what I'm doing now, which causes it to hang forever if the line activity goes away..
waitfor "REPORT COMPLETE" FOREVER
I'm trying to make it so that if there is no line activity it can abort the current report and then go place another call and process another one.
I am trying a "while 1" loop and only bail out when the "REPORT COMPLETE" has surfaced, or, the capture has gone
idle indicating that no input is coming through over the line so I can start processing the next job. What happens is that the REPORT COMPLETE will occur and be waiting for a carriage return from me and the code path that will execute is the ; CAPTURE IS IDLE
Does anyone have a possible suggestion for me? I'm still digging and reading, but I'm getting frustrated.. thanks
proc WaitForCompleteOrIdle
while 1
; Has the report been generated?
waitfor "REPORT COMPLETE" 1
if SUCCESS
; "REPORT COMPLETE EXIT WHILE" )
exitwhile ; The report has been generated
else
; "REPORT NOT COMPLETE" )
endif
; Has capture not given us anything for 15 secs?
waitquiet 15 30 ; waitquiet reports FAILURE when capture is still active
if SUCCESS
; CAPTURE IS IDLE
disconnect ; hang up..
call retry_line_later ; retry current job later
exitwhile ;
else
; CAPTURE IS NOT IDLE
endif
endwhile
endproc ; WaitForCompleteOrIdle