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!

script needed to DNB multiple phones

Status
Not open for further replies.

motox2

Programmer
Jun 21, 2007
426
0
0
GY
Hi there, does anyone have a script that will DNB multiple phones at once from an excell file or something like that?
Thanks again!!!
 
are you trying to prt the dnb of a list of numbers?

john poole
bellsouth business
columbia,sc
 
Please explain what you mean, your question doesn't make any sense.


This is a Signature and not part of the answer, it appears on every reply.

This is an Analogy so don't take it personally as some have.

Why change the engine if all you need is to change the spark plugs.


 
And with "DNB multiple phones" you meen?

As a pointer on how to to read from a spreadsheet
and put into switch, some code from a script I used:
Code:
   if ddeinit ExcelLink "excel" c:/meridian/myspreadsheet.xls        ; excel file to be used.
     if ddeinit SheetLink "excel" "Sheet1"          ; Sheet in Excel file to be used.
   while 1
   (rownr++)
         strfmt rowcell "R%dC2" rownr
         dderequest SheetLink rowcelle dnbnumber    ; Read DNB number from colomb 2.
         strreplace dnbnumber "`r`n" ""
      
         strfmt rowcell "R%dC3" rownr
         dderequest SheetLink rowcelle tnpos        ; read TN-pos from colomb 3.
         strreplace tnpos "`r`n" ""
         if nullstr tnpos      ; If cell is empty were at the end, exiting.
      exitwhile              
         termwrites dnbnumber
         termwrites tnpos
      endwhile

      ddeterminate SheetLink  
      ddeterminate ExcelLink       
      else
         errormsg "Couldnt open file!"
      endif
   else
      errormsg "No running Excel found!"
   endif
While this is not a "working" script, it should show you how to:
1. Open a spreadsheet for reading.
2. Read from it, and
3. Put it into a variable that you can transmit to the switch.

Use the help function in procomm for more details on the commands.


HTH :)
 
Oops, there should be a
endif right after the exitwhile line
Sorry 'bout that.
;-)
 
Yes im trying to print a dnb of a set list of numbers. We have a list of about 300 DNs (7 digit format) that we need to get the TN's on them all. Thanks again!!
 
Try this website he has some great programs to sort all your different printout to spreadsheets so you can analyize them better.





This is a Signature and not part of the answer, it appears on every reply.

This is an Analogy so don't take it personally as some have.

Why change the engine if all you need is to change the spark plugs.
 
Thanks everybody for the info, but does anyone have a script that will do what im trying to do based off my previous posts?
Thanks again!!
 
I don't think anyone understands what it is you want to do, maybe you can explain more?


This is a Signature and not part of the answer, it appears on every reply.

This is an Analogy so don't take it personally as some have.

Why change the engine if all you need is to change the spark plugs.


 
I appologize for the confusion here, let me try again.....
What i need is a simple script that i can use to print out TN information for multiple DN's. I have compiled a list of DN's saved in CSV format that i want to use as the input for the script. I really dont know how else to explain this request, so if anyone can help me out i would appreciate it. Thank you!!
 
johnpoole maybe able to help with scripts, but it would be a mulit script proccess. 1st you would need a script to prt the DNB's and then you would need a script to take the DNB's and print the TNB's.

That website I posted will let you print your complete TNB and parse it to a spreadsheet that you can sort any way you want to get info. there are several other useful parsers there to, but this one is the best.


This is a Signature and not part of the answer, it appears on every reply.

This is an Analogy so don't take it personally as some have.

Why change the engine if all you need is to change the spark plugs.


 
if you use the MV.xls file, it will give you a snapshot of the entire PBX, that you can then manipulate via excel, no script of any kind required. This is also a good backup in case you delete a phone or something.

JohnThePhoneGuy

"If I can't fix it, it's not broke!
 
motox2 just try it, you might like it.


This is a Signature and not part of the answer, it appears on every reply.

This is an Analogy so don't take it personally as some have.

Why change the engine if all you need is to change the spark plugs.


 
Are you trying to input your DN's from a spreadsheet. Sounds like you are looking for a script that will build the phone or whatever you are tryiing to do and then read the DN from a spreadsheet saved as a CSV. Is that right?

Andy Ramirez
NNCSS BCM 3.0

What thaaa????
 
this one prints a list of dn's

Code:
Proc main

  
   
   
  
	string dn
   
   integer count
   string szline
   fopen 0 "dn.wud" read

   while not feof 0
   SZLINE = "2"
   fgets 0 szline

    strtok dn szline "t"  1  
  			  ;strtok dn szline ","  1 
   set txpace 50
  
   transmit "prt^M"
   waitfor "TYPE: "
   transmit "dnb^M"
   waitfor "CUST "
   transmit "0^M"
   waitfor "DN "
  
    transmit dn
    mspause 10
    transmit "^M"
     waitfor "DATE "
   transmit "^M"
   waitfor "PAGE "
   transmit "^M"
  ; waitfor "DES  "
   transmit "^M"
   mspause 6
  ;pause 1
   transmit "^M"
  waitfor "NACT "
  transmit "^M"
   waitfor "REQ: " forever
 
   
   
  
    count += 2
   endwhile
   fclose 0
   fclose 1
   call main
   
   endproc

capture that. pull it up in excel and then run the tn's through this one
Code:
Proc main

  
   
   
   string tnb
  	;string dn
   
   integer count
   string szline
   fopen 0 "tnb.wud" read

   while not feof 0
   SZLINE = "2"
   fgets 0 szline

    strtok tnb szline "t"  1  
  			  ;strtok dn szline ","  1 
   set txpace 20
   ;capture on
   ;transmit "disu "
   ;transmit tnb
   ;transmit "^M"
   ;waitfor "REQ: "
   transmit "prt^M"
   waitfor "TYPE: "
   transmit "tnb^M"
   waitfor "TN "
  
    transmit tnb
    mspause 10
    transmit "^M"
     waitfor "DATE "
   transmit "^M"
   waitfor "PAGE "
   transmit "^M"
   waitfor "DES  "
   transmit "^M"
   waitfor "NACT "
   transmit "^M"
   waitfor "REQ: " 
  ; capture off 
  ;waitfor "REQ: "
   

 
   
   
  
    count += 2
   endwhile
   fclose 0
   fclose 1
   call main
   
   endproc


i usually use the tnb one after grabing a list from ld 81. either way these tend to save me time


john poole
bellsouth business
columbia,sc
 
John, thanks for your help. You nailed it man thats exactly what i wanted. I applogize and dont understand why this was so difficult to understand. A script to merely print out a list of DN's inputed from an excel file, not all 15,000 on the system, i just needed a few hundred. Thanks again!! for everyones help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top