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!

Trouble with Nortel FLEN prompt in CDP Script Aspect Programming in Procomm 2

Status
Not open for further replies.

FoneChick

IS-IT--Management
Nov 7, 2002
49
CA
Hello all

I am having trouble with this script. Have used in the past with no issues. Problem is that I had never had to populate the FLEN prompt before. I need to set the FLEN to 4 for all CDP entries. The script below reads through an excel list of DNs to CDP. I've tried adding a FLEN column in the excel sheet with "4" noted for each entry or hard coding the "4" in the script. It works erratically, seems to not notice the FLEN in the waitfor and just spits it out at DSP (the next prompt) for the most part. Have started from a "Start Recorder" script to ensure (I'd hoped) that the prompts captured correctly. Have tried various waitfor parameters and pause thus far with no success. Any and all help greatly appreciated.


integer Ro = 2 ;* Starting row
string TypeDN, DNVal
string TypeFLEN, FLENVal


Proc Main
long LinkVar, SystemVar ;* Variables containing DDE Id's.

if ddeinit SystemVar "excel" "system"
ddeexecute SystemVar "[APP.MINIMIZE()]" ;* Minimize Excel
if ddeinit LinkVar "excel" "sheet1" ;* Link to Sheet 1

While Ro < 7 ;* first empty Row in Excel

strfmt TypeDN "%s%d%s%d" "R" Ro "C" 1 ;*set address of cell holding the phone's DN
strfmt TypeFLEN "%s%d%s%d" "R" Ro "C" 2 ;*set address of cell holding FLEN

;*** The following gathers the info

Dderequest LinkVar TypeDN DNVal
Dderequest LinkVar TypeFLEN FLENVal


;*** CDP the DNs
waitfor "REQ "
transmit "new^M"
waitfor "CUST "
transmit "1^M"
waitfor "FEAT "
transmit "cdp^M"
waitfor "TYPE "
transmit "dsc^M"
waitfor "DSC "
transmit DNVal
waitfor "FLEN "
transmit "4^M"
waitfor "DSP "
transmit "^M"
waitfor "RLI "
transmit "16^M"
waitfor "NPA "
transmit "^M"
waitfor "NXX "
transmit "^M"
waitfor "DSC "
transmit "^M"
Ro++ ;* Increment Row Number
Endwhile
Endif
Endif
Endproc
 
One thing I've seen in the past are non-printable characters in a prompt, such that the waitfor doesn't trigger as expected. You can bring up Procomm's Monitor Window to see if you are receiving FLEN as expected, or if there is something additional in that string. I've copied some information on how to do this from my site below:

Procomm's Monitor Window can be used to view the incoming and outgoing data, in both hex and ASCII format. To activate this window, select the Data | Monitor Window menu item. Resize the Monitor Window so that you can view the entire width of the window, then click back in the Procomm Plus window so that the Monitor Window does not have focus. Incoming text is displayed in red, while text you send is colored blue. The Monitor Window can be handy for viewing incoming escape sequences (to determine if Procomm Plus is responding properly to them) or to verify that the program is sending the data you think it should be.

Another possibility, do you need to send an enter after your transmit DNVal?

 
holy crap, knob, you are aspectscripting.com? Nice to find you. Can I get your help on something lol. I referenced it in another post 2 days ago. And to phone hes right you need to send ^M after DNVal to send the command to the option. If it still hangs due to a slow processor or noisy line just insert a line of pause 5 between.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top