home *** CD-ROM | disk | FTP | other *** search
- /*convert program for sftp*/
- rc = RxFuncAdd("SysLoadFuncs","RexxUtil","SysLoadFuncs")
- rc = SysLoadFuncs()
- call syscls
- say "This utility is used to update sftp host.txt"
- say "files that were created with an sftp program"
- say "version older than version 1.11."
- say ""
- say "The host.txt file in version 1.11 takes a new"
- say "format that supports host aliases. Old host.txt"
- say "files will not work with version 1.11 and must"
- say "be converted."
- say ""
- say "This utility will display your host names with"
- say "their statistics one at a time. You then have"
- say "the opportunity to add an alias for each of the"
- say "hosts. You may want to work with a copy of your host.txt"
- say "if you have spent a good deal of time building it."
- say "This program expects to find a copy of host.txt in"
- say "the directory that it resides."
- say ""
- say "Do you want to continue with this program?"
- say ""
- say "Press Y and ENTER to continue."
-
- pull test
- if test = "Y" then
- do
- filename="hosts.txt"
- i=0
- do
- do while lines(filename)
- i=i+1
- hostval.i.hst=linein(filename)
- hostval.i.usr=linein(filename)
- hostval.i.pas=linein(filename)
- hostval.i.dir=linein(filename)
- end /* end do */
- hostcount=i
- rc=stream(filename,'c','close')
- end /* end do */
-
- filename='hosts.txt'
- rc=sysfiledelete(filename)
- rc=lineout(filename)
- do i = 1 to hostcount
- call syscls
- say hostval.i.hst
- say hostval.i.usr
- say hostval.i.pas
- say hostval.i.dir
- say ""
- say "The host statistics for host number "||i
- say "are listed above."
- say ""
- say "Please type an alias name for this host."
- say "For example, a host such as hobbes.nmsu.edu"
- say "with the default directory set to /incoming"
- say "could use an alias such as "hobbes incoming.""
- say ""
- say "Enter the alias below and press enter when done."
- parse pull alias
- hostval.i.als=alias
- rc=lineout(filename,hostval.i.als)
- rc=lineout(filename,hostval.i.hst)
- rc=lineout(filename,hostval.i.usr)
- rc=lineout(filename,hostval.i.pas)
- rc=lineout(filename,hostval.i.dir)
- end
- rc=lineout(filename)
- end
-