proc main integer iEntries ;Number of entries in dialing class integer iCount ;Loop variable string sName ;Name of Connection Directory entry dialcount TELNET iEntries ;Get number of entries in specified dialclass for iCount = 0 upto (iEntries - 1) dialname TELNET iCount sName ;Get entry name corresponding to index number statmsg sName dial TELNET sName ;Make telnet connection while $DIALING ;Loop while making connection yield endwhile pause 1 if $CARRIER == 1 ;If connected ;do commands here endif endfor endproc