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

Problem with transmit sending a CR after

Status
Not open for further replies.

pyutian

IS-IT--Management
Dec 10, 2003
58
US
Hello, I'm having an issue with the following script, in that after the code "Transmit cdp" it sends 2 CR's bringing me past where I want to enter the next CDP to out.

proc main




Waitfor "REQ" 3
Transmit "OUT^M"
Waitfor "CUST" 3
Transmit "0^M"
Waitfor "FEAT" 3
Transmit "CDP^M"
Waitfor "TYPE" 3
Transmit "DSC^M"
DSC ()

endproc

proc DSC

string cdp
integer count = 0

fopen 0 "c:/phone/cdp.txt" read
while not feof 0

fgets 0 cdp

Waitfor "DSC" 3
Transmit cdp
count += 1

endwhile
fclose 0
endproc

Here is a copy of the output from my switch:

REQ OUT
CUST 0
FEAT CDP
TYPE DSC
DSC 3011
DSC



MEM AVAIL: (U/P): 45361283 USED U P: 5770566 498228 TOT: 51630077
DISK SPACE NEEDED: 807 KBYTES
REQ 3012

ESN004
REQ


ESN004
REQ 3013

ESN004
REQ

It works at the first DSC prompt but enters past the second giving me the REQ prompt.

Any help would be appreciated
 
Have also tried inserting :strreplace cdp "`n`r" "" into the script with no luck.

Thanks
 
Ok, I figured it out. Had to add the "text" flag to the end of my fopen stamement.

Thanks
 
Try:

Code:
                 Waitfor "DSC" 3
                 waitquiet 2
                 Transmit cdp
                 count += 1

Adjust the waitquiet time as necessary. I think I've run into similar situations where the text you're waiting for appears multiple times (back to back.) And the only thing I came up with is to force a pause somewhere in the process.
 
Thanks for the input kodr, but figured it out earlier with adding "text" to the end of my fopen stamement.

But thanks for the responce!

Pyutian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top