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

Finding Entry In Directory with Script File 1

Status
Not open for further replies.

MyFlight

Technical User
Feb 4, 2002
193
I am trying to write a script file to Select an entry from a ProCom Directory. However I need to match on the Company Name. Since this is a Multiphase script I need to keep the Company in memory (Global Variable). Once the I use DialLoad to load the directoy I cannot match on the Company, I assume because the Find is looking at the Enry name. Is there a way to Search on the Company and Fetch all information for that entry and then dial it.

Thanks all input is appreciated.
 
I think the only way to search on something other than the entry name is to use the set/fetch dialentry commands. Below is a script from my site that shows how to iterate through the entries in a Connection Directory and retrieves several values, including the company name.

proc main
integer iEntries ;Number of entries in dialing class
integer iCount ;Loop variable
string sName ;Name of Connection Directory entry
string sAreaCode
string sCompany
string sPhoneNumber
string sUserID
string sPassword
string sMisc

dialcount DATA iEntries ;Get number of data entries
for iCount = 0 upto (iEntries - 1)
dialname DATA iCount sName ;Get name of entry based on index
set dialentry access DATA sName ;Turn on dialentry for the current entry
fetch dialentry areacode sAreaCode
fetch dialentry phonenumber sPhoneNumber
fetch dialentry company sCompany
fetch userid sUserID
fetch password sPassword
fetch misc sMisc
endfor
endproc

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top