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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Procomm script to dial a list of modems and report on success or failure???

Status
Not open for further replies.

ABHC

Technical User
Dec 15, 2007
9
US
We have around 1000 remote devices around the US that have modems in them for OOB access. Does anyone have a script in their archives that dials all numbers in a particular data group and then creates a file or has a mechanism to report if that device failed to connect or failed to get the anticipated response?

THANKS,


ABHC
 
When the modem connects is there any text given the the emulator software, or are you just wanting to report that the line is seized?
 
jamie2,

Thanks for the response.

The terminal servers are Uplogix models made by Envoy. When and if the modem answers, the terminal server will output a string that includes the key word "continue". If I don't get an answer or subsequently the key word "continue" then I would like to mark that modem as failed and add it to a file named Failed with the date appended. (The file would go in the Aspect folder)

FYI- I inherited a script I use with ProComm Plus to dial a group but it does not work correctly. To date the script adds the successful connections to the failed folder. LOL

Any help you could offer would be greatly appreciated.



 
Sorry about the mistake. They are Envoy term servers made by Uplogix.

ABHC
 
Can you post the script you currently have? Maybe we can tweak it just a little.
 
Below is the script. I suspect the reason it rights the success in the Failures file because the emulator hangs up just before the second "if". Needs a timer of how long the first "if" waits for the string “CONTINUE”. If it is not received then write to the Failure file.

Note: When the modem doesn't answer then I do not get an entry in the Failure file. Works backwards...

Thanks

ABHC






string fname ;first part of file name
string datefilename ;this is the date part of file name


proc main


dial DATA GROUP " Envoy" CONNECTALL ; Dial Symantec entry.

while $DIALING
endwhile



if $DTR == 1

waitfor "continue" ; The typical prompt you get when connected to the Envoy.

pause 5
hangup ; Hang up the phone line.
pause 5
endif

if $DTR == 0
fname = "Failures " ;put the first part of name here leave a space at the end
call file_date ;calls file_date proc
strcat fname datefilename ;this combines the two string (in this case M1_Log YYYYMMDD)
call call_fail
endif




endproc

proc file_date
integer iDay, iMonth, iYear, iHour, iMin, iSec
ltimeints $LTIME iYear iMonth iDay iHour iMin iSec
strfmt datefilename "%d%02d%02d" iYear iMonth iDay
strcat datefilename ".TXT"
return
endproc

proc call_fail
if fopen 0 Fname APPEND
fputs 0 $DIALSELECT

pause 5 ;waits 5 seconds
endif
return
fclose 0
endproc
 
ABHC, I found out that our PC Support Team had removed my Procomm software from my PC, so I can't test/modify your script. (Sorry)... I have merged over using ZOC by Emtec and hadn't used my Procomm in some time. I Firebird, should be able to assist you (He eats Aspect scripts for breakfast).
 
I think your reasoning on why the successful connections are showing in the failures log is correct. Get rid of the if $DTR == 0 line and replace the endif command just above with an else command and I think you should be good to go.

 
THX knob but now I get no Failure file at all. Here is what I have just to make sure I edited the script correctly.


while $DIALING
endwhile



if $DTR == 1

waitfor "continue"

pause 5
hangup ; Hang up the phone line.
pause 5
else
fname = "Failures " ;put the first part of name here leave a space at the end
call file_date ;calls file_date proc
strcat fname datefilename ;this combines the two string (in this case M1_Log YYYYMMDD)
call call_fail
endif




endproc

proc file_date
integer iDay, iMonth, iYear, iHour, iMin, iSec
ltimeints $LTIME iYear iMonth iDay iHour iMin iSec
strfmt datefilename "%d%02d%02d" iYear iMonth iDay
strcat datefilename ".TXT"
return
endproc

proc call_fail
if fopen 0 Fname APPEND
fputs 0 $DIALSELECT

pause 5 ;waits 5 seconds
endif
return
fclose 0
endproc
 
Try moving the fclose 0 at the end of the script to before the return command. My suspicion is that the file is still open when you exit from the call_fail procedure with the return command, and thus no changes are written to the file.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top