Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Workaround Error 21 - Batch File

Status
Not open for further replies.

ianb16

Programmer
Nov 8, 2002
17
CA
I have created a workaround the error 121 I was previously running into.

The solution was to create a batch file running the 31 entries I had in 4 call groups.

Therefore I dial into one company at a time capturing data then exiting Procomm.

Problem: The problem I have is that the script for each company launches only after a connection is made. Therefore if the number is busy after x retries. Procomm is left running idle and the next line in the batch file never gets executed.

Does anyone have any suggestions how procomm can exit if no connection is made?

Thanks.
 
You can use the pwexit command to close your currently-running script and Procomm. I didn't have much time to look back over your script, but if you use this structure:

if $CARRIER
current script contents go here
else
pwexit
endif

I think it should work for you. You could add some sort of reporting mechanism in the else clause that displays a message via the usermsg command or writes to a results file so that you are aware that connection was not made.
aspect@aspectscripting.com
 
Thanks for the reply.

Would this mean that I would need to have the script execute right away as opposed to when the connection is made?

Secondly, should there be a delay factor waiting for the carrier befor I test for the $CARRIER to be true?

Thanks.

Ian


 
I have set up a loop while dialing:

while $DIALING
endwhile

but the program exits from the while loop, before
the dialing is complete.

Why would this happen?

I stored the value of $DIALING to a variable and set a breakpoint to check on this value, which was 1 after exiting the loop.
 
I don't have a modem on this machine to test this, but try using this code:

while $DIALING
yield
endwhile
if $CARRIER
your current script goes here or you could use the
chain command to launch your current script
else
pwexit
endif
aspect@aspectscripting.com
 
Once I put in the "yield", everything worked fine.

I will be doing a complete "stress" test overnight tonight.

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top