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

Can Aspect get failure count from ProCom?

Status
Not open for further replies.

mailbox125

Technical User
Apr 1, 2003
44
0
0
US
I have written a script that dials several systems and runs and captures reports. Is there a way that the script can capture any of the systems that ProCom was not able to log onto, or is that something in ProCom??
 
Depending on how your script is written, you should be able to do something to capture this information. If you are using a waitfor command, you could use this structure:

if not waitfor "string"
;expected prompt not received
else
;continue on with your script
endif

You could also check the value of $CARRIER after you have connected to the system. If $CARRIER == 0, then you are not connected. If your script is attached to the Connection Directory entry you are dialing, then you can get the name of that entry with the $DIALENTRY system variable.


aspect@aspectscripting.com
 
Knob, thanks for your input. Am I doing this all wrong will Aspect dial from the directory of ProCom which in turn would run another script? instead of trying to pull this information from an Excel file and haveing to maintain both the Excel spreadsheet as well as the directory in ProCom?
 
You can associate a script with a Connection Directory entry (click on the Basic Options button) that can run either before the connection is made or after. You can have a script dial a Connection Directory entry using the dial command, and the script associated with that entry will then execute. I don't have a modem handy on this machine to test, so I am not certain if control would return to the "master" script or not.


aspect@aspectscripting.com
 
Thanks I have done that so that each of these systems I'm logging onto already has it's own script. I'd like to be able to write a script that will go through the dialling directory and call each member of a group in the ProCom dialling directory and each of those contain thier own script, that would eliminate the need to maintain an Excel sheet for the number, password and capture file. So I guest my question is how do I write a script to dial each entry in the dialling directory?
 
The following will dial all entries in a dialing directory.

Code:
proc main
   string sEntName                   ; for entry name
   integer iDDSize                   ; for size of dial dir
   integer iCount                    ; for current entry ID

   dailload "PW5.DIR"                ; load dial directory
   dialcount DATA iDDSize            ; count # of entries
   for iCount = 0 upto (iDDSize - 1) ; for each entry
      dialname DATA iCount sEntName  ; get entry name
      dial DATA sEntName             ; dial entry
      while $DIALING                 ; pause while dialling
         yield
      endwhile
      if $CARRIER
         ; if connect successful continue processing.
          
      else
         ; if connection fails display on status line
         ; entry name and reason for failure.
         statmsg "%s: %s" $DIALENTRY $CNCTMSG

      endif
   endfor
endproc
[code]
 
If you do not want to dial all entries in the directory, but want to limit it to a particular group, you can specify the group name in the dialcount & dialname commands. For example;
Code:
.
.
dialcount DATA GROUP "My Group" iDDSize
for iCount = 0 upto (iDDSize - 1)
   dialname DATA GROUP "My Group" iCount sEntName
.
.
 
If you want to log the errors to a file instead of the status line you can use the fopen command to append a log file. For example you could replace the statmsg line with;
Code:
fopen 1 "errorlog.txt" append text
   fstrfmt 1 "%s: %s - %s`r`n" $TIME $DIALENTRY $CNCTMSG
fclose 1
to log the time, entry name and reason for failure to a file called errorlog.txt in you current script directory.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top