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

ProComm PLUS 2.0

Status
Not open for further replies.

L0stAngel

Programmer
May 5, 2005
58
US
Hello, I am running ProComm PLUS 2.0, and have a problem.

I am running the below script to gather data.

Code:
string record
string outputfile = "c:\prowin2\capture\phonelog.cap"

proc main
   set capture path "c:\prowin2\capture"
   set capture file "phonelog.cap"
   call PortSettings                   ;setup Procomm Plus software to automatically collect data from superswitch.
   fopen 1 outputfile WRITE            ;open the output file to collect data.
   fseek 1 0 2                         ;position the file pointer to the end of the file.
   set aspect rxdata ON                ;tell this program to handle the data received through the comm port.
   capture on
   while 1                             ;Loop forever
      while $RXDATA                    ;see if there is data awaiting.
         comread record 88             ;collect an 88 character record from the comm port.
         fputs 1 record                ;send the record to the output file.
         termwrites record             ;writes the record to the screen.
         fclose 1                      ;closes the file to save the record.
         fopen 1 outputfile WRITE      ;reopens the output file to await new data.
         fseek 1 0 2                   ;repositions the file pointer to the end of the file.
      endwhile
   endwhile      
endproc

proc PortSettings
   set port baudrate 19200
   set port databits 8
   set port parity none
   set port stopbits 1
   set autoanswer data
   set capture file outputfile
endproc

This code worked good for a while...then it started adding blank lines between each phone log...and only displays the date once. How can I get rid of these blank lines, and also have it display the time/date of the calls on each line?
 
You might try using fopen 1 outputfile APPEND if version 2.0 supports that (I don't have that ASPECT manual handy at the moment). That could eliminate any problems with setting the file pointer at the end of the file, which I suppose could be responsible for the blank lines. You might also want to take a look at what is in the record string to see if you are getting extra characters (linefeed or carriage return, for example) from the system that could cause the extra lines.

Another thing I noticed is that you have a capture file open, but are also logging to the second text file. I think this will keep any data from appearing in the capture file since comread intercepts the data before Procomm can display it. Data only appears in the capture file is it is shown on-screen.

I also don't see anywhere in the script where the date is processed. Is that part of the string you are expecting to come across?


 
Thanks for your help, as for the date...im not sure what to add to the script to make the date appear...i'm mostly a Visual Basic Programmer, so ASPECT is different for me and unsure of how to get the date.
 
Was the date previously being saved to the file? If so, then I think something must have changed on the system you are saving data from since there are no commands in the script that deal with the date. Can you post some examples of when the data being captured was correct?


 
It currently was saved to the file at the begining of each day...not sure how. Here is a excerpt from the log:

Code:
CLASS TIME    LINE    DURATION  STATION     DIALLED No./CLI    ACCOUNT        
POT  00:42 008        00:03:52 333        555-5555
 
Do you see that information on the screen in Procomm at anytime? What if you access the system and don't run the script? My guess, since I don't see anywhere in the script where Procomm writes that specific infomration, is that the data is not coming back from the system in the same format that it was previously.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top