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!

Parsing capture file from Meridian ACD

Status
Not open for further replies.

jojomore

Technical User
May 22, 2001
10
0
0
US
I need help with a solution to capture 11 pieces of data from a Meridian ACD...
Right now I am capturing all output (hourly) into a text file, which is then copied to a network drive so customer service can access it and then the specific data is being re-entered into a spreadsheet for analysis. The part of the report that they need occurs at 17:00 daily, it is the Daily Totals Report, and there are only 11 fields. Things such as total calls answered, average speed of answer, avg call time, avg hold time, etc.
I put the aspect script together to capture the data and save it with the date, copy it to network drive, but when it comes to parsing I am over my head...
Any suggestions, or does anyone have something similar in place already?
Thanks, Joanna
 
If the captured data is always in the same position or is preceded by a constant string, then this should be a snap. First, here's an example of how to open a text file in ASPECT:

proc main
string sLine

fopen 0 "foo.txt" READ TEXT ;Open our data file
while not feof 0 ;While the file still has data
fgets 0 sLine ;Read a line of data

endwhile
fclose 0
endproc

Replace foo.txt in the fopen command with the path and name of the capture file.

After the fgets 0 sLine command is where you would put the parsing code. If the data is always in a constant format, you could add the necessary number of additional fgets commands to read up to the correct line(s). Once you have read the line, you could use some of the string commands such as substr or strtok to break out the data you were interested in. If the data is preceded by a header or other constant text, you could use the strfind command on each read line to make sure that you have the correct line of data before attempting to parse it.


aspect@aspectscripting.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top