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 ACD data capture script 1

Status
Not open for further replies.

MarleneE

IS-IT--Management
Nov 4, 2002
3
US
I am only vaguely familiar with scripting with Procomm. Someone gave me the below script to auto capture my ACD daily reports from Procomm. For some reason it is not capturing the whole day including the last time entry at 18:00 hour that read Daily Report Totals. Can anyone help with this - our one person who knows this stuff at my company is currently stationed in Kuwait. Any help would be greatly appreciated - I can't be the only person who has needed to do this, can I?

string cmd="ncopy c:\capture\"
string szFileName = $DATE
string szDate = $DATE
integer Pos = 0

proc main
dial data "Option 61"
set capture overwrite OFF ; if capture file exists, append data to it.
capture off ; close capture file if it is open
when TARGET 0 "ACD DN 5324" call CLOSECAP

Startloop:
clear ; clear contents of screen and scroll back buffer
szFileName = $DATE
szDate = $DATE
while 1
if nullstr szFileName ; Check to see if we've reached
exitwhile ; the end of source string
endif ; and if so, exit loop.
if strfind szFileName "/" Pos ; Check for char
strdelete szFileName Pos 1 ; and delete it
else
exitwhile ; exit if no more characters
endif
endwhile

strcat szFileName ".txt"
set capture file szFileName ; Set name of capture file.
capture on ; Open up the capture file.
while strcmp $DATE szDate ; Loop while date is the same
endwhile ; or if the date changes,
capture off ; Close the capture file.
goto Startloop ; and start a new one.
endproc

proc closecap
pause 3
strcat cmd szFileName ; Append to variable "CMD"
strcat cmd " h:\uab\" ; Append network drive to "CMD"
transmit "^M***********^M" ; Put in asteriks between hourly reports
capture off ; Close capture file
pause 5
DOS cmd HIDDEN i0 ; Run "CMD" in DOS and copy file to the LAN
pause 10
taskexit i0 ; Exit DOS window
pause 10
cmd="ncopy c:\capture\" ; Reset "CMD"
capture on ; Turn Capture back on.
Endproc

 
Marlene,

It appears that the WHEN TRAGET is Looking for the String "ACD DN 5324" to appear. Is the ACD DN 5324 the Daily Report ?

Hank
 
ACD DN is the name of the phone number that my calls route to.
 
I didn't see any obvious problems in the script. Does it save all data up to the 16:00 report? Where does the ACD DN 5324 string appear when the reports are run? I'm wondering if the script is receiving that string more than once per report, which could possibly cause some of the data to not appear.
aspect@aspectscripting.com
 
Marlene,

Do you want to do a 24 Hour Capture after you connect to the System. That Can be done easily enough. Let me know and I'llpost a Script that will handle that.

Hank
 
I would guess the problem is probably due to what knob is discussing. A quick way to patch the script may be to change the line "pause 3" in the close cap to a
"waitquiet 15".
This would work if the data comes out in a fairly constant stream and no data comes out afterwards until something else is done.
A better option would be to change the "ACD DN 5324" to the ACD's prompt character in the when TARGET statement. This will work if the prompt is not in the middle of the data stream.

If in the worst case the prompt does show up in the middle of the dump. Do something like:

Code:
proc closecap
   waitfor "c:\>" 3    ; the "c:\>" should be whatever the ACD prompt is
                             ; the 3 is for 3 seconds and should be set a small as possible 
                             ; to prevent false positives
   if SUCCESS          ; if the waitfor was successful 
                             ; ie. the prompt was received then
                             ; do the original closecap proc
      waitquiet 3        ; or pause 3
      strcat cmd szFileName        ; Append to variable "CMD"
      strcat cmd " h:\uab\"        ; Append network drive to "CMD"
      transmit "^M***********^M"        ; Put in asteriks between hourly reports
      capture off                ; Close capture file
      pause 5
      DOS cmd HIDDEN i0            ; Run "CMD" in DOS and copy file to the LAN
      pause 10
      taskexit i0                ; Exit DOS window
      pause 10
      cmd="ncopy c:\capture\"        ; Reset "CMD"
      capture on                ; Turn Capture back on.
   endif
Endproc
[/endcode]
 
Thank you everyone! I can usually figure out enough of some types of scripting to wing it, but this combined with my limited telecom knowledge is a bit much.

hankm3 - please send me the 24 hour capture info.

knob - The report captures up to hour 18:00, which ends our work day. But the second report stamped 18:00 thatis generated is my Daily Totals which it does not capture. I think if I can set it to capture a 24 period it will solve the problem. I hope.

det07 - I am going to try amending the script with what you posted and see if it works. I won't know for sure until Monday.

Thanks again for all your help!!!!!!
 
Hi,
Could Hankm3 send me a copy of the 24 hour script mentioned above, I have similar problems with my Procom script which is identical to the one posted above. I'm wondering if the 24hour solution will fix it.

Many Thanks
fraserk@airproducts.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top